Netezza String Functions and its Usage with Examples

Netezza String Functions are used primarily for string manipulation. An IBM Netezza also supports some of the standard string function along with the PostgreSQL specific functions. Netezza String Function Usage Below is the list of Netezza String functions supported: Function Name Description ascii(s) Returns the numeric ASCII value of the first character in the text string. btrim(s) Trims spaces from both ends of the string. btrim(s,t) Trims occurrences of the characters in string t from bothe ends of string s chr(n) Returns the character with the specified ASCII value. initcap(s) Capitalizes the…

Continue ReadingNetezza String Functions and its Usage with Examples
2 Comments

Netezza Hash Function Usage and Examples

You can use Netezza hash function to encode the data by transforming the input into a hash code or hash values. If you use the hash function, no two inputs have same hash values. The hash algorithm is designed to minimise the collision (two inputs having same hash value). You can use the hash function to speed up the data record retrieval by using simple one way lookup. Hash code is used as an index into a hash table which has a pointer to data records. Netezza hash function also…

Continue ReadingNetezza Hash Function Usage and Examples
Comments Off on Netezza Hash Function Usage and Examples

Netezza Correlated Subquery and its Restrictions

Netezza Correlated subquery is a query within a query that refer the columns from the parent or outer query. Netezza does support the regular and correlated subqueries. In most cases, the Netezza correlated subqueries are used to improve the SQL query performance. Netezza Correlated Subquery Example For example, consider query, “check if department is already exists in the patient table before selecting it from patient department table”. We can correlate both tables and write sql query. You can write the SQL as below: SELECT T1.DEPT_CD , DATA_SRC_CD , T1.DEPT_NM FROM…

Continue ReadingNetezza Correlated Subquery and its Restrictions
Comments Off on Netezza Correlated Subquery and its Restrictions

Download and Configure Netezza Linux ODBC Driver

This section describes you about downloading, configuring and testing Netezza Linux ODBC driver. This process is tested on the Ubuntu 14.04. Netezza Linux ODBC Drivers are requires to connect to Netezza server from any client machine. Read: Install vmware player and Netezza emulator on Ubuntu Connecting Netezza using Python pyodbc - Working ExampleNetezza FPGA nzsql Command and its Usage nzload command and its Usage Download Netezza Linux ODBC Driver You can download Netezza Linux ODBC Driver from Netezza fix central page. Below is url for your reference: https://www-945.ibm.com/support/fixcentral/ Note that, IBM…

Continue ReadingDownload and Configure Netezza Linux ODBC Driver
Comments Off on Download and Configure Netezza Linux ODBC Driver

Netezza Set Operators:UNION, MINUS and INTERSECT

You can use the Netezza set operators to combine similar data sets from two or more SELECT statements. Here the similar data set literally mean, the data type of the result set should also match, otherwise you have to explicitly type cast data when using Netezza set operators. Read: nzsql command and usage nzload command and usage Types of Netezza Set Operators Netezza supports the three types of set operators: UNION [DISTINCT] and UNION ALL INTERSECT [DISTINCT] EXCEPT [DISTINCT] or MINUS [DISTINCT] Netezza Set Operators Syntax: Below is the general…

Continue ReadingNetezza Set Operators:UNION, MINUS and INTERSECT
Comments Off on Netezza Set Operators:UNION, MINUS and INTERSECT

Download and Install Netezza SQL Extensions Toolkit

The Netezza SQL Extensions toolkit is an optional package that contains additional SQL functions for IBM Netezza data warehouse appliances. The Netezza SQL Extensions toolkit contains various functions and regular expressions that are useful in day to day computations. You can download this package from the IBM site and install to particular database. Read: Netezza Advanced Date Functions and Examples dasdas Download the Netezza SQL Extensions Toolkit Login to IBM fix central site given below and download sql-ext-version.tar.gz file. Download Extension toolkit here Once the software is downloaded copy that…

Continue ReadingDownload and Install Netezza SQL Extensions Toolkit
Comments Off on Download and Install Netezza SQL Extensions Toolkit

Netezza Dynamic SQL Queries and Examples

There may be situation where you want to generate Netezza dynamic SQL queries inside your Netezza NZPLSQL procedures. Or, you may have procedures that  generates other procedures or CREATE TABLE or update the records form the table based on some condition. You can also set some session specific variables dynamically inside the stored procedure and execute the queries. For such situations, Netezza NZPLSQL provides the “EXECUTE IMMEDIATE” statement. You can execute the Netezza dynamic SQL queries only in stored procedures. You cannot execute the queries within Netezza block statements. Read:…

Continue ReadingNetezza Dynamic SQL Queries and Examples
Comments Off on Netezza Dynamic SQL Queries and Examples

Commonly used Netezza Utilities

It is very easy to perform the ETL (Extract, Transform and Load) functionalities in Netezza. Netezza supports utilities those can be used to perform the ETL/ELT operations. Below are some of commonly used Netezza utilities: Read: Commonly used Netezza Basic Commands nzload utility nzload is bulk data load utility available in Netezza. This utility supports loading data from flat file to Netezza database tables. Below is the syntax and usage: Usage: nzload -host <host> -db <database> -u <username> -pw <password> -t <target_table_name > -df /user/home/flat_file.txt by default, nzload supports '|'…

Continue ReadingCommonly used Netezza Utilities
2 Comments

Netezza System Tables and Views

There are lot of Netezza system tables and views views available. You can get the more information about the users, tables, synonyms etc. Read: Netezza data types and length restrictions Netezza Query History details using nz_query_history Table Netezza System Tables and Views Below are the list of some commonly used system tables and views: View Table Description _v_sys_columns Return a list of all columns of table available in database. This is very important system view that can be used to search columns. _v_aggregate _t_aggregate Returns a list of all defined…

Continue ReadingNetezza System Tables and Views
1 Comment

Netezza Analytic Functions

Netezza analytic functions compute an aggregate value that is based on a group of rows. A Netezza SQL analytic function works on the group of rows and ignores the NULL in the dat.  Netezza server is basically an analytics system and provides many useful functions that can perform day to day aggregations. As these functions are native to Netezza server, hence use of these Netezza analytic functions improves performance of SQL queries as well as server performance. Frequently used Netezza analytical functions are as follows: COUNT Analytic Function Returns the number of…

Continue ReadingNetezza Analytic Functions
Comments Off on Netezza Analytic Functions