0% found this document useful (0 votes)
154 views

Netezza SQL

This document provides information on using environmental variables, sessions, executing queries from files, reading input, storing count values in variables, and outputting to files when using the nzsql command line tool to interact with a Netezza database. Key steps include setting NZ_USER, NZ_PASSWORD and NZ_DATABASE environmental variables, using ALTER, DROP and SHOW commands to manage sessions, executing queries from files using -f or \i, reading input using <, storing result counts in variables like VAR1, and outputting query results to files with -o or \o.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views

Netezza SQL

This document provides information on using environmental variables, sessions, executing queries from files, reading input, storing count values in variables, and outputting to files when using the nzsql command line tool to interact with a Netezza database. Key steps include setting NZ_USER, NZ_PASSWORD and NZ_DATABASE environmental variables, using ALTER, DROP and SHOW commands to manage sessions, executing queries from files using -f or \i, reading input using <, storing result counts in variables like VAR1, and outputting query results to files with -o or \o.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Netezza:-Environmental variables ----------------------NZ_USER="xxx" NZ_PASSWORD="*****" NZ_DATABASE="TRAINING_DB" NZ_SECURITY_LEVEL : preferredSecured, preferredUnsecured, onlySecured, onlyUnsec ured SESSIONS --------ALTER, DROP, SHOW

\set->displays session variables TO EXECUTE QUERIES FROM A FILE ------------------------------1. nzsql -f filename 2. nzsql \i foo.sql TO READ INPUT ------------nzsql < foo.sql(eg.) TO STORE THE COUNT VALUE IN A VARIABLE -------------------------------------VAR1= nzsql -A -t -c "select count(*) from test_table" OUTPUT TO A FILE ---------------1. nzsql -o foo.out 2.nzsql \o foo.out

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy