SAP Knowledge Base Article - Preview

2559997 - iqunload generates incorrect syntaxes for LOAD TABLE without double quotes for some columns and CREATE DATABASE missing IQ SIZE value -SAP IQ

Symptom


iqunload utility may generate incorrect syntax for CREATE DATABASE and LOAD TABLE statements.
This is more likely to occur for IQ NLS tables when the following conditions are met:

  1. If a database table contains a VARCHAR column that uses forward slashes in its name (for example, /BIC/BBB),
    the name is not enclosed by quotation marks in the generated LOAD TABLE statement. The forward slashes result in syntax errors.
  1. If a database table name contained forward slashes (for example, /BIC/TABLE1), the generated FROM clause in the LOAD TABLE statement
    would contain an invalid path (for example, FROM 'data_dir/DBA_/BIC/TABLE1_DATA_1.inp' ).

Examples of incorrect syntaxes:

  • The incorrect LOAD TABLE statement looks like:

LOAD TABLE "owner"."/BIC/TABLE1"
( /BIC/col1 NULL('NULL'), ..., -- varchar column name is not not enclosed by quotation marks
"/BIC/col2" NULL('NULL'), .. -- decimal column
)
FROM 'data_dir/DBA_/BIC/TABLE1_DATA_1.inp' -- invalid path
..

  • The generated CREATE DATABASE statement is missing the size value in the IQ SIZE clause.

In the following example, the numeric value that should follow IQ SIZE is missing.

CREATE DATABASE iqdata.db' LOG ON 'iqdata.log' PAGE SIZE 4096
COLLATION 'CESU8BIN(CaseSensitivity=Respect)'
NCHAR COLLATION 'UCA(CaseSensitivity=UpperFirst;AccentSensitivity=Respect;PunctuationSensitivity=Primary)'
BLANK PADDING ON
JCONNECT ON
CHECKSUM ON
DBA USER '***' DBA PASSWORD '***'
SYSTEM PROC AS DEFINER OFF
IQ PATH 'iqdata3.iq'
IQ SIZE -- missing size value
TEMPORARY PATH 'iqdata3.iqtmp' TEMPORARY SIZE 500
MESSAGE PATH 'iqdata3.iqmsg'
IQ PAGE SIZE 131072
BLOCK SIZE 8192


It causes the syntax error like below:


Could not execute statement.Syntax error near '/' on line 8SQLCODE=-131, ODBC 3 State="42000"Line 17559
You can continue executing or stop.
---- Reload data for table "owner"."/BIC/TABLE1"-- Bytes per row: 265---- Stats: Row group: Rows -- 1: 7269--
LOAD TABLE "owner"."/BIC/TABLE1" (..., /BIC/col1 NULL('NULL'), "/BIC/col2" NULL('NULL'),...))
FROM  'data_dir/DBA_/BIC/AAA_DATA_1.inp'
ROW DELIMITED BY '\r\n' QUOTES ON ESCAPES OFF DEFAULTS OFF FORMAT ASCII CHECK CONSTRAINTS OFF


Read more...

Environment

  • SAP IQ 16.0
  • SAP IQ 16.1

Product

SAP IQ 16.0 ; SAP IQ 16.1

Keywords

"double quotes", "Syntax error near '/' ", "Schema and Data Export", 811844, CR#811844, CR 811844, CR811844 , KBA , BC-SYB-IQ , Sybase IQ , BW-SYS-DB-IQ , BW on HANA with Sybase IQ Near-line Storage , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.