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
0
votes
1 answer

How to copy data from Netezza DEFINITION_SCHEMA [ignoring the bytea error]

I am trying to analyse the code used in the stored procs on our Netezza server. First step is to get the definitions/code contained in the stored procs - this can easily be done by either of the following: Using the system views select …
Cor Basson
  • 43
  • 1
  • 5
0
votes
1 answer

Long Query Execution through VBA concatenation

I'm setting up an automated excel vba workbook that extracts data through a Query, while getting the parameters from Excel cells. So far it has worked on simple Queries and SPs but I'm trying to pass a very long query and it seems Excel Functions…
Matías Romo
  • 100
  • 6
0
votes
1 answer

Using nzsql commands in aginity

I'm working with Netezza on Aginity workbench on my windows computer. I'm wondering how I can use nzsql commands such as \l to get a list of databases as shows on this site: http://netezzaonline.blogspot.com/2013/10/netezza-cheat-sheets.html near…
tee
  • 1,286
  • 2
  • 19
  • 35
0
votes
1 answer

Netezza : Fetch all database names and write to a file in unix directory

I want to create a shell script which runs a Netezza SQL and create lookup file dbnames.lkp in a unix directory lookup file name : dbnames.lkp Could someone help me with nzsql command. I know just to connect to Netezza server using nzsql command…
user6855124
0
votes
2 answers

Export specific query data to CSV file from netezza database

I wanted to export data from netezza database to CSV file. The format for the data will be: col1,col2,col3 OR: "col1","col2","col3" I am using the query: CREATE EXTERNAL TABLE 'H:\\test.csv' USING ( DELIMITER ',' REMOTESOURCE 'ODBC' ) AS SELECT *…
RohanB
  • 294
  • 2
  • 5
  • 19
0
votes
1 answer

Using nzload to upload a file with two differing date formats

I am trying to load onto Netezza a file from a table in an Oracle database, the file contains two separate date formats - one field has the format DD-MON-YY and the second field has the format DD-MON-YYYY hh24:MI:SS, is there any with in NZLOAD to…
0
votes
1 answer

How do I use regex on Netezza to find integers?

I'm using the following function to find integers: where NZ_SQLEXTN..REGEXP_LIKE(d.ID, '[0-9]') I just noticed that it's not picking up negative numbers. When I do where NZ_SQLEXTN..REGEXP_LIKE(d.ID, '[^0-9]'), the result set is all negative…
simplycoding
  • 2,770
  • 9
  • 46
  • 91
0
votes
2 answers

How to access parameters inside a Netezza stored procedure?

This is my stored procedure: nzsql -u user -pw pass -c "CREATE OR REPLACE PROCEDURE INSERT_LOGIC(varchar(50),varchar(20),varchar(40)) RETURNS BOOL LANGUAGE NZPLSQL AS BEGIN_PROC DECLARE t1 ALIAS FOR $1; t2 ALIAS FOR $2; t3 ALIAS FOR…
Macopare
  • 155
  • 1
  • 3
  • 11
0
votes
2 answers

difference between extract and date_part

What is the exact difference between date_part() and extract functions in netezza?
0
votes
2 answers

nzsql command in ssis

Is it possible to connect SSIS to an uniX server? How can run an nzsql command from SSIS in an unix server to invoke another netezza server. SSIS --> UNIX --> NZSQL --> NETEZZA server
sriram L
  • 5
  • 5
0
votes
1 answer

creating log and error files in nzsql

i am using nzsql query to run a query , i was able to create the required data file, but even after creating data file, but log and error file created were of size zero. SCRIPT USED: nzsql -Atv dt="'2015-12-31'" -v a=0 -v…
sriram L
  • 5
  • 5
0
votes
2 answers

Netezza stored procedure run

I have 12 stored procedures in netezza. I call these procedures using nzsql command from a shell script. I want to run these procedure in parallel to increase throughput. How can I do this?
0
votes
1 answer

How do I use session variables in Netezza nzsql?

How do I create and use session variables in Netezza nzsql? How can I use session variables as part of strings? Can I concatenate session variables with strings? Can I embed session variables in strings? How can I use them as part of table…
Mr. Llama
  • 20,202
  • 2
  • 62
  • 115
0
votes
1 answer

How to use row_number and partition function in sqldf

Update I can run below sql query in netezza database, but it goes wrong in sqldf package in R > sqldf("SELECT TEXT, + VEH_MAKE_NM, + NEW_USED_CD, + PRODUCT, + OVERALL_SUBV_IND, + AS_OF_DATE, + CATEGORY, + ROW_NUMBER() OVER(PARTITION BY TEXT,…
WayToNinja
  • 285
  • 4
  • 14
-1
votes
1 answer

Netezza- getting count of deleted records from a SQL statement

I am creating a script in Unix where I can put multiple delete NZSQL one after the other. But since the data volume is huge in each table, I want the script to display the output of each delete SQL, like how many records were deleted and how much…
Vivek Rana
  • 43
  • 1
  • 4
1
2