SQL adaptation guide For IBM Netezza 1.x / Data manipulation |
The ANSI string delimiter character is the single quote ( 'string'). Double quotes are used to delimit database object names ("object-name").
Example: WHERE "tabname"."colname" = 'string'
Informix® allows double quotes as string delimiters, but Netezza® doesn't. This is important since many BDL programs use that character to delimit the strings in SQL commands.
The Netezza database interface can automatically replace all double quotes by single quotes.
Escaped string delimiters can be used inside strings like following:
'This is a single quote: ''' 'This is a single quote: \'' "This is a double quote: """ "This is a double quote: \""
For example, if the program executes the SQL statement:
WHERE "tabname"."colname" = "string"
replacing all double quotes by single quotes would produce:
WHERE 'tabname'.'colname' = 'string'
This would produce an error since 'tabname'.'colname' is not allowed by Netezza.
Although double quotes are replaced automatically in SQL statements, you should use only single quotes to enforce portability.