Questions tagged [nzsql]

The nzsql command invokes a SQL command interpreter on the IBM® Netezza®.

The nzsql command invokes a SQL command interpreter on the IBM® Netezza® host or on a UNIX client system. You can use this SQL command interpreter to create database objects, run queries, and manage the database. This command is not available for Windows platform.

IBM Documentation: https://www-304.ibm.com/support/knowledgecenter/SSULQD_7.1.0/com.ibm.nz.adm.doc/r_sysadm_nzsql_command.html

30 questions
4
votes
1 answer

How to output a file using tab delimiter in Netezza NZSQL

I am trying to output some files using NZSQL CLI but not able to output as tab delimited files. Can somebody who has worked on NZ share your thoughts on this below command. Tried so far :- nzsql -o sample.txt -F= -A -t -c "SELECT * FROM…
Teja
  • 13,214
  • 36
  • 93
  • 155
3
votes
1 answer

"NzSQLException: The update count exceeded Integer.MAX_VALUE" ERROR only on JDBC connection

When constructing a rather large table in netezza, I get the following ERROR when using a JDBC connection: org.netezza.error.NzSQLException: The update count exceeded Integer.MAX_VALUE. The table does get created properly, but the code throws an…
tipanverella
  • 3,477
  • 3
  • 25
  • 41
3
votes
3 answers

NZLOAD is working while External Table in Netezza failing with count of bad input rows reached maxerrors

Intermittent issues with Netezza External Table . External table is failing with the file generated by the system itself(Meant the file generated by external table not from other sources).But we tried to load the same file via nzload utility to…
Anoop R
  • 545
  • 3
  • 8
  • 19
3
votes
1 answer

netezza nzsql export query results into csv file

when i export query results into csv using netezza nzsql commndline , the o/p is printed to file in fixed length format. i.e if a col is defined as 4k length its printing out 4k length sting irrespective of lenght of the stored string in that field.…
data
  • 61
  • 1
  • 6
2
votes
1 answer

How to Bulk Import data from file into Netezza DB?

I want to bulk import data from a file present on my local into the Netezza Database using NZSQL language. I tried with below query but, I am not able to do it. create external table ext_tab ( login_email VARCHAR(10),identifier int,first_name…
sujay777
  • 41
  • 5
2
votes
1 answer

Netezza import from external file error: Unsupported external table reference, unable to derive shape

I'm working to create a new table from an external file in Netezza, but am getting the following error: Unsupported external table reference, unable to derive shape I get the same error whether trying to create a new table or insert into an existing…
Eric
  • 23
  • 3
1
vote
1 answer

Pass column name from _V_SYS_COLUMNS table to create a dynamic select query in Netezza

I need to create a single dynamic select query for different tables in Netezza. I get the list of columns for any table by using following query: select * from _V_SYS_COLUMNS where TABLE_NAME='Table Name' But I need to append all the values of…
1
vote
1 answer

Max parameter that can pass IN clause in Netezza

In Netezza, One can specify an IN clause, like this: (just like sql) SELECT * FROM user WHERE id IN (1000, 1001, 1002) Does anyone know what's the maximum number of parameters you can pass into IN? I know Oracle allows up to 1,000 IN list values…
Aditya Dhanraj
  • 189
  • 1
  • 1
  • 12
1
vote
1 answer

how to group by a specific order?

eid start end status 6158963 11/27/2016 1/7/2017 FT 6158963 1/8/2017 5/9/2017 FT 6158963 5/10/2017 5/20/2017 LA 6158963 5/21/2017 7/31/2017 LA 6158963 8/1/2017 9/9/2017 FT 6158963 9/10/2017 10/21/2017 …
green
  • 13
  • 2
1
vote
1 answer

Netezza Window Partitioning Syntax

The Netezza documentation for Window Partitioning states you can use window partition syntax to name one or more columns. I would appreciate it if someone would please provide me an example of this? I don't really understand the documentation…
BSCowboy
  • 317
  • 4
  • 13
1
vote
1 answer

Get exact match from a string in Netezza

I am trying to extract a substring from a string and do comparison with other string and see if its a complete match or not. Can someone share your thoughts on how to accomplish this using regular expressions. Thank you. **Input…
Teja
  • 13,214
  • 36
  • 93
  • 155
0
votes
1 answer

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) with conn.cursor() as cursor: try: cursor.execute("select * from…
Sparkles
  • 61
  • 2
  • 6
0
votes
0 answers

How to SET NOCOUNT ON/OFF inside a Netezza stored procedure?

Based on NZ documentation, it seems NZSQL equivalent command NO_ROWCOUNT will suppress row count information. But how do I execute/apply it inside a NZ stored procedure? I've tried to create and executed a NZ SP that contains the command "SET…
0
votes
1 answer

netezza: Unable to identify a function

I have a requirement to extract data from Netezza DB into a text file. In this process I need to add additional \ before \ or " that exists in data. when I try to use the below mentioned sql query in it is working. select guest_key,…
naga satish
  • 193
  • 2
  • 11
0
votes
1 answer

How to get a column YYYY as procces_year and MM AS process_month from a date with YYYYMMDD and YYYYMM format? in Netezza sql

I have some dates like 20190101 (YYYYMMDD) and 201901 (YYYYMM) in a column called process_date and I need two columns, a column called process_year with the year (YYYY) and process_month with the month (MM), when I use…
1
2