Skip to main content
Filter by
Sorted by
Tagged with
-2 votes
1 answer
72 views

Combining SQL and Regex together?

I have a table pizza_orders with a column ingredients that looks like this: order_no ingredients 1 cheese-olives-peppers-olives 2 cheese-olives 3 cheese-tomatoes-olives 4 cheese I want to make 3 ...
wulasa's user avatar
  • 155
0 votes
1 answer
87 views

Calcualting Medians in SQL

I am trying to figure out how to calculate MEDIAN in GROUPS within SQL (i.e. required to use NTILE() functions to indirectly calculate the median). I read somewhere on the internet that some SQL ...
wulasa's user avatar
  • 155
0 votes
0 answers
28 views

SHA256 hash for Netezza

I am working on an application that provides connectivity to Netezza Performance Server(NPS) 7.2 and trying to use SHA256 authentication mechanism to achieve the same. I have tried using the SHA256 ...
abhi's user avatar
  • 185
-6 votes
1 answer
69 views

Finding out the cumulative number of missing rows per group [closed]

I have this table in SQL about the years in which students were studying in a school: CREATE TABLE myt ( student_name VARCHAR(50), student_year INT ); INSERT INTO myt (student_name, student_year) ...
stats_noob's user avatar
  • 5,773
-1 votes
2 answers
40 views

SQL: Comparing Identical Rows in Different Tables and then Updating

I have these two tables : old_table was created on 2020-01-01 and new_table was created on 2020-01-02. CREATE TABLE old_table ( name1 VARCHAR(50), name2 VARCHAR(50), origin_date DATE, ...
stats_noob's user avatar
  • 5,773
0 votes
3 answers
71 views

SQL; Ensuring a Condition is Met After the Join

I have these two tables: CREATE TABLE my_table1 ( name VARCHAR(50), var1 DATE, var2 INT ); INSERT INTO my_table1 (name, var1, var2) VALUES ('john', '2010-01-01', 94), ('john', '2010-01-04'...
stats_noob's user avatar
  • 5,773
0 votes
2 answers
60 views

SQL: Counting Number of Occurrences Past a Certain Date

I have these two tables: CREATE TABLE my_table1 ( name VARCHAR(50), var1 DATE, var2 INT ); INSERT INTO my_table1 (name, var1, var2) VALUES ('john', '2010-01-01', 94), ('john', '2010-01-04'...
stats_noob's user avatar
  • 5,773
-1 votes
1 answer
47 views

SQL: Join based on closest date

I have the two following tables: CREATE TABLE my_table1 ( color VARCHAR(50), d1 DATE, var1 VARCHAR(50) ); INSERT INTO my_table1 (color, d1, var1) VALUES ('red', '2010-01-01', 'a'), ...
stats_noob's user avatar
  • 5,773
0 votes
1 answer
44 views

Automate queries in NETEZZA using Azure Data Factory

I have a complex process that occurs monthly and want to automate the process. I have approximately 10 queries that I manually run in Netezza to output a dataset which can take around 2 days to ...
Its a Lama's user avatar
0 votes
2 answers
48 views

Error retreiving database 'NZPYIDA' with NZFunApply function

I'm trying to run this code via jupyter notebook to apply a function on the table in netezza server, so I can apply this code on the table inside without getting data out of table/database. from ...
Sarath M's user avatar
0 votes
1 answer
90 views

Can't load plugin: sqlalchemy.dialects:netezza.nzpy

I have some worries with using nzalchemy together with SQLAlchemy. I tried using version 1.4.52 and the latest 2.0 version, but the failure remains always the same. Whenever I try to connect to some ...
brillenheini's user avatar
0 votes
0 answers
60 views

convert a Julian date to gregorian date in netezza

I need to convert a integer column with Julian date values to gregorian date in netezza sql. The source column has values like '41606', '100702', please help
user86683's user avatar
  • 121
3 votes
2 answers
169 views

Finding out Neighbors of a Node using SQL

I have the following table in SQL: CREATE TABLE friendships ( id INT PRIMARY KEY, person VARCHAR(50), friend VARCHAR(50) ); INSERT INTO friendships (id, person, friend) VALUES (1, '...
stats_noob's user avatar
  • 5,773
0 votes
1 answer
92 views

Decode binary file in AWS environment using PySpark

Is it possible to consume a Netezza backup file in AWS environment and load it to Redshift. File is a compressed binary file created using the below query. This file can also be produced using ...
need_the_buzz's user avatar
0 votes
2 answers
45 views

Why can Netezza admin see a table saved to Netezza via Coginiti Pro

I created a table from an excel file in Coginiti Pro and then saved it to the Netezza. I can see the table and can query from it in Coginiti Pro, Excel, and Power BI Desktop. However, the Netezza ...
Bruce Slagle's user avatar
0 votes
0 answers
70 views

What's the alternative of Listagg in Netezza?

SELECT ID FROM TABLE_A WHERE DATE >= CURRENT_DATE; The output for the above query will be 001 002 003 I need the output as 001,002,003. I am trying below in Netezza but GROUP_CONCAT is not ...
ImSahil's user avatar
  • 81
0 votes
1 answer
25 views

Operation Not Supported on Non-User Columns?

I have the following SQL code: # does not work select count(*), count(distinct p) from (select *, rowid as p from elephants)zzz But I get the following error: Operation Not Supported on Non-User ...
Uk rain troll's user avatar
1 vote
0 answers
41 views

Keep one occurrence of each pair by year if a condition is met

I have this table ("colors") in SQL: CREATE TABLE colors ( color1 VARCHAR(50), color2 VARCHAR(50), year INT, var1 INT, var2 INT, var3 INT, var4 INT ); INSERT ...
Uk rain troll's user avatar
-1 votes
1 answer
50 views

Performing a Horizontal UNION ALL in SQL

I have this table (colors) in SQL: CREATE TABLE colors ( color1 VARCHAR(50), color2 VARCHAR(50), year INT, var1 INT, var2 INT ); INSERT INTO colors (color1, color2, year, var1, ...
Uk rain troll's user avatar
0 votes
1 answer
69 views

Returning Row Numbers When Conditions Are Met

I am working with Netezza SQL. I have the following table: name year var1 var2 John 2001 a b John 2002 a a John 2003 a b Mary 2001 b a Mary 2002 a b Mary ...
stats_noob's user avatar
  • 5,773
0 votes
0 answers
39 views

Calculating Cumulative Number of Library Books Returned

I created this table ("date_ranges") in Python and uploaded it to an SQL Server: import pandas as pd from dateutil.relativedelta import relativedelta def generate_dates(start_year, end_year)...
Uk rain troll's user avatar
0 votes
1 answer
62 views

Keeping One Fruit Combination by Year

I have this table of fruits: name1 name2 year1 year2 apple pear 2010 2001 apple pear 2011 2002 pear apple 2010 2003 pear apple 2011 2004 apple null 2009 2005 pear orange ...
stats_noob's user avatar
  • 5,773
0 votes
0 answers
25 views

Selecting Names With Specific Subset of Years

I have this table: CREATE TABLE my_table ( name INT, year INT ); INSERT INTO my_table (name, year) VALUES (1, 2010); INSERT INTO my_table (name, year) VALUES (1, 2011); INSERT INTO my_table (...
Uk rain troll's user avatar
3 votes
0 answers
108 views

Identifying Sequences of Rows that Meet a Condition

I have this table in SQL (sample_table): CREATE TABLE student_table ( student INT, var CHAR(1), d1 DATE, d2 DATE ); INSERT INTO student_table (student, var, d1, d2) VALUES (1, 'd',...
Uk rain troll's user avatar
0 votes
1 answer
72 views

Prevent CASE WHEN statements from Overwriting Previous Statements

I have this SQL code here: with first_cte as ( select *, case when var1 = 1 then 'a' when var1 = 0 then 'b' end as new_var_1, case ...
Uk rain troll's user avatar
0 votes
0 answers
17 views

Horizontally Stretching a Table in SQL

I have this table: CREATE TABLE table_a ( name_1 VARCHAR(255), name_2 VARCHAR(255), year INT, var1 VARCHAR(255), var2 INT ); INSERT INTO table_a (name_1, name_2, year, var1, var2) ...
Uk rain troll's user avatar
0 votes
1 answer
215 views

Creating Missing Rows Based on Conditions

I am working with Netezza SQL. I have the two following tables: # table_a id year 1 2010 1 2011 1 2012 1 2013 1 2014 2 2010 2 2011 2 2012 2 2013 2 2014 3 2010 3 2011 3 2012 ...
stats_noob's user avatar
  • 5,773
1 vote
2 answers
176 views

Convert CHARACTER DATATYPE TO INTEGER DATATYPE in Netezza SQL

I have a table TABLE_A Which has all the column as CHARACTER DATATYPE. Let's say in one of the column I have the value like : Column_A <Blank_Value> 123 1,123 I have to insert this value in ...
ImSahil's user avatar
  • 81
0 votes
0 answers
37 views

SQL: Conditional Calculations by Group

I am working on Netezza SQL. I have the following table: var1 var2 var3 1 a c e 2 a d f 3 a c f 4 b d e 5 b c f 6 b d f My Problem: I am trying ...
stats_noob's user avatar
  • 5,773
1 vote
1 answer
428 views

Dbeaver / DBVisualizer with Netezza

Good afternoon, I'd been searching in a lot of websites (including the official IBM site) trying to find the nzjdbc.jar file, the JDBC driver for Netezza. I need to connect to a Netezza DB in my work, ...
Ignacio Morales's user avatar
0 votes
0 answers
47 views

Rolling 6 month in Netezza

I need to delete data older than 180 days from my agg table Below delete command doesn't seems to be working Delete from agg_table where sale_date <= '20231101' - 180 Delete from agg_table where ...
Vidhyut's user avatar
  • 11
0 votes
2 answers
85 views

SQL: Cumulative Sums by Month

I am working with Netezza SQL. I have the following table (my_table): type var1 var2 date_1 date_2 a 5 0 2010-01-01 2009-2010 a 10 1 2010-01-15 2009-2010 a 1 0 ...
stats_noob's user avatar
  • 5,773
0 votes
0 answers
31 views

Netezza SQL query to concatenate the records of the specific column when the unique keys are same for more than one records

Concatenate multiple records for the specific column when the unique keys are same Share the answer using subquery without inbuilt function I have used groupconcat , listagg, stringagg non of them are ...
Jeevitha R's user avatar
3 votes
3 answers
275 views

SQL: Creating Tables using CTEs

I am working with Netezza SQL. I have the following SQL code: create table sample1( var1 integer, var2 integer ); insert into sample1(var1,var2) values(1,1); insert into sample1(var1,var2) values(2,2)...
stats_noob's user avatar
  • 5,773
0 votes
1 answer
84 views

SPARK + JDBC Netezza - TypeError: An error occurred while calling file.save

I am using Spark to load a Dataframe into Netezza database. I'm getting an intermittent error on a Netezza JDBC connection and I don't know why. I have been following the error for a month and they ...
PAULO CRISTIANO KLEIN's user avatar
0 votes
1 answer
43 views

SQL: Making Automatic Groups in a Variable

I am working with Netezza SQL. I have a table (my_table) that looks like this: id var1 1 1 43.95244 2 2 76.98225 3 3 255.87083 4 4 107.05084 5 5 112.92877 6 6 271.50650 7 7 146....
stats_noob's user avatar
  • 5,773
0 votes
1 answer
98 views

Creating Netezza external table using zipped text file

I am new to IBM Netezza SQL. Is it possible to create Netezza external table using zipped text file? File is very large, I am trying to create external table directly from zipped text file if that is ...
Sandeep Pai's user avatar
0 votes
1 answer
46 views

SQL: Finding Out All Possible Combinations of Years Per ID per Group

I am working with Netezza SQL. I have the following dataset ("my_table") about students (over the years 2010-2015), the current degree major they are enrolled in, the date than an exam was ...
stats_noob's user avatar
  • 5,773
0 votes
1 answer
330 views

cannot connect to NZ database using NZPY in python with the user who can connect without a password

I am trying to connect to NZ db from python using NZPY. conn = nzpy.connect(user="DEV_USR", host="bac-nettezza", port =5480,database="DEV",securityLevel=1,logLevel=0) ...
Sparkles's user avatar
0 votes
0 answers
62 views

SQL: Min/Max Values of Group are Changing?

I am working with Netezza SQL. I have the following table ("my_table"): gender country favorite_color disease height weight id 1 m mexico blue n 193.6547 62....
stats_noob's user avatar
  • 5,773
0 votes
0 answers
52 views

SQL: Does the Partition Order Change the Results of a Query?

I am working with Netezza SQL. I have the following table (that I created with R and uploaded to a simulated Netezza SQL connection): set.seed(123) num_rows <- 10000 gender <- sample(c("m&...
stats_noob's user avatar
  • 5,773
1 vote
2 answers
102 views

SQL: Counting the Number of Times a "Type" of Row Appears

I am working with Netezza SQL. I have the following table: CREATE TABLE MY_TABLE ( id VARCHAR(50), year VARCHAR(50) ); INSERT INTO MY_TABLE (id, year) VALUES ('123', '2010'); INSERT INTO ...
stats_noob's user avatar
  • 5,773
0 votes
2 answers
148 views

R/SQL: Finding Out If Table Contains A Certain Value

I am working Netezza SQL. Suppose I have 3 tables located on a server (e.g. in real life there could be many such tables and each table with many rows and many columns): table1: col1,col2,col3 table2:...
stats_noob's user avatar
  • 5,773
1 vote
4 answers
337 views

SQL: Learning How to Use The Percentile Functions in SQL

I am working with Netezza SQL. I have the following table: CREATE TABLE MY_TABLE ( country VARCHAR(50), gender CHAR(1), age INTEGER, height FLOAT, owns_bicycle VARCHAR(3) ); ...
stats_noob's user avatar
  • 5,773
0 votes
4 answers
146 views

How to convert Netezza to_timestamp & tochar to SQL Server?

I want to convert Netezza TO_TIMESTAMP(TO_CHAR(POL.PERIOD_FROM_DATE, 'FM99999999999999999'), 'YYYYMMDDHH24MISSMS') AS EFFECTIVE_DATE to a SQL Server function to include this in IBM Cognos Framework ...
prudhvi's user avatar
-1 votes
2 answers
181 views

How to verify SSL Enablement in Netezza Database using a query in client tool like DBVISUALIZER?

I am trying to check or verify SSL is enabled or not for my current Netezza connection. I have tried multiple queries, but none of the them is working. Below are some listed queries, which I tried in ...
sujay777's user avatar
0 votes
0 answers
129 views

How to configure and enable SSL in Netezza Database on new port?

I want to enable SSL for Netezza DB. I have generated certificates and Key and placed over "nz/data/secuity" path on my server. Also configured postgresql.conf file and made ssl=true ...
sujay777's user avatar
0 votes
1 answer
154 views

Header row missing text while exporting to a file using CREATE EXTERNAL TABLE in Netezza

After the extract, the file is missing the header column text. It adds and empty line with delimiter. It only happens when I use an alias name with a function in Netezza. I have seen some solutions ...
need_the_buzz's user avatar
0 votes
0 answers
581 views

LDAP Authentication failure for user

I installed a software called Coginiti Pro (Aginity Pro), entered the license key to activate the software, and tried to connect to the Netezza database/driver. But when the credentials are entered, I ...
Sew3's user avatar
  • 9
-2 votes
1 answer
64 views

Trying to use join to aggregate data and getting odd output [closed]

When running this query been getting an odd error I've not yet encountered, this query is executed within Netezza SELECT a.CALENDAR_DATE, b.NewBusinessUnit, b.ResellerID, b.ResellerName,...
WildJester's user avatar

1
2 3 4 5
28