View previous topic :: View next topic
Author
Message
soumen2255 New User Joined: 25 Jun 2008Posts: 24 Location: Pune
Can Anyone please help me out with what this error means while DB2 insert-
SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: ,;( + - ? : CASE CAST NULL USER <FLOAT> CURRENT DEFAULT NEXTVAL
Back to top
dbzTHEdinosauer Global Moderator Joined: 20 Oct 2006Posts: 6966 Location: porcelain throne
The following is from the -104 description and response paragraphs,
which obviously you have read:
Quote:
A syntax error in the SQL statement was detected at 'token'
Examine the statement in the area of the specified token.If you are executing the SQL statement dynamically under TSO, be sure that if the data set containing the DSNHDECP load module has not been included in your LINKLSTxx, it has been included in STEPLIB statements in:1. The DB2 start-up procedure 2. The TSO logon procedure or batch job JCL.
since you have not bothered to provide us with ANY information about
what are you trying to do
what does the data look like
what does the ddl for the table look like
you are on your own.
Back to top
Craq Giegerich Senior Member Joined: 19 May 2007Posts: 1512 Location: Virginia, USA
soumen2255 wrote:
Can Anyone please help me out with what this error means while DB2 insert-
SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: ,;( + - ? : CASE CAST NULL USER <FLOAT> CURRENT DEFAULT NEXTVAL
Any chance you could cut and paste the original sql statement so we could see it.
Back to top
soumen2255 New User Joined: 25 Jun 2008Posts: 24 Location: Pune
Craq Giegerich wrote:
soumen2255 wrote:
Can Anyone please help me out with what this error means while DB2 insert-
SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: ,;( + - ? : CASE CAST NULL USER <FLOAT> CURRENT DEFAULT NEXTVAL
Any chance you could cut and paste the original sql statement so we could see it.
Hi Craq,
Fot security reasons I cannot post the insert statement,It has 90 columns with the following datatypes : DECIMAL(10,0)
CHAR(4)
DATE
CHAR(3)
CHAR(7)
CHAR(2)
CHAR(6)
CHAR(1)
DECIMAL(15,2)
CHAR(9)
DECIMAL(15,0)
CHAR(10)
VARCHAR(120)
TIMESTAMP
Thanks in advance.
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10886 Location: italy
Quote:
For security reasons I cannot post the insert statement
if You cannot provide the requested info, why waste everybody' s time ???
have Your support people start earning their salary
Back to top
William Thompson Global Moderator Joined: 18 Nov 2006Posts: 3156 Location: Tucson AZ
Back to top
soumen2255 New User Joined: 25 Jun 2008Posts: 24 Location: Pune
enrico-sorichetti wrote:
Quote:
For security reasons I cannot post the insert statement
if You cannot provide the requested info, why waste everybody' s time ???
have Your support people start earning their salary
hERE IS MY INSERT STATEMENT :
Code:
INSERT INTO DEMO.TEST(DCC_N,EDC_FJZ_C,ED_EFF_D,ED_END_D,DJN_I,DCC_DDKE_I,DJN_DGK_C,ZJD_UNIG_I,ZJD_HD_I,DCC_HZEN_D, DCC_CLK_D,DCC_CLK_JKN_C,DCC_HJIGBN_C,DCC_KBDB_C,DCC_CHNGN_KBDB_C,DCC_HDNZ_BYZ_C, DCC_DHC_KBKFY_C,DHC_CZZLNC_C,DCC_DJ_CDJD_CK_C,CDC_DJ_CDJD_BYZ_C,IHD_BYZ_9_C,IHD_BYZ_2_C, IHD_BYZ_9_C,IHD_BYZ_9_C,IHD_D,IHD_D,IHD_UZD_EGNB_C,IHD_JBJN_HDJG_C,IHD_JKK_ZJBY_9_C, IHD_JKK_ZJBY_2_C,IHD_JKK_ZJBY_9_C,CDC_IHD_UZD_D,CUJ_C,CDC_DKCLJ_HDJN_C,CDC_HBKD_ZHK_C, CDC_BYZ_C,CDC_CDD_JGKBN_C,KF_C,CDC_NKBD_KF_C,IZ_BIN_BYZ_C,CDC_DDDL_JDBE_C,DI_ZJHCD_DIKZ_C, DI_ZYZB_KJCE_C,DI_DIKDB_FJEQY_C,DI_INCZ_DIKZ_C,DI_KBK_KZLB_DIKZ_C,DI_CEJBF_DIKZ_C, DI_CEJBF_KJCE_C,DI_XFJ_INKBJN_C,ZYI_BYZ_C,CDC_BDX_HFFK_C,CDC_CZN_BYZ_C,CDC_CKZ_C, CDC_CFZ_KUZJ_C,CDC_DCDB_ZNDG_C,CDC_CZN_DDK_C,CDC_HHHLD_C,CDC_CHJ_KUD_CHJ_C,DDK_I, KYK_DDK_CDD_KEND_C,KYK_DDK_CDD_KEND_D,KYK_DDK_JZD_KEND_C,KYK_DDK_JZD_KEND_D,CDC_JKND_JZD_C, CDC_JKND_DNK_C,CDC_ZDINC_JIKKC_C,CDC_ZDINC_DDILL_C,CZN_LDKB_KBZB_D,HZB_DKCLJ_KENB_D, CDC_ID_ZXY_DUBH_C,CDC_ID_ZXY_DUBH_D,KYK_DNK_HNE_JKND_C,KYK_DNK_HNE_JKND_D,CDC_ZDCC_ZFL_C, CDC_JZD_KDZ_DLK_C,CDC_KF_DLK_D,CDC_DZG_DZZGL_C,CDC_DZG_DZZGL_D,CDC_BDX_BYZ_C,CDC_UZD_D, ED_UKD_I,ED_UZD_Z,CDC_HZB_KIGN_D,CDC_ZKCJ_LBY_DNK_C,CDC_ZKCJ_LBY_FEE_C,CDC_EFB_GND_C,IZ_BIN_I, CDC_BBL_NZE_B, DCC_KJCH_KHJB_X) VALUES (9792900,'0000','2009-99-90','',' DD',' 99599 ','02','K79970','DD02 ','2009-99-90','', ' ',' ','D',' ','07',' ',' ','C',' ',' ',' ',' ',' ',,'',' ','D','Z',' ',' ', '2009-99-90',' ','Y',' ',' ','JD','029',' ','K',' ','B','D',' ','9','5','L','N','F',' ',' ', ' ',' ',' ',' ',' ',' ',' ',799990955929090,' ','',' ','',' ',' ',' ',' ','2009-09-99','', ' ','',' ','',' ',' ','',' ','','9','2007-09-92','JCDDZ209 ','2009-09-05 29:09:00.000990','', ' ',' ',' ','097799799', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'Dd')
Back to top
dbzTHEdinosauer Global Moderator Joined: 20 Oct 2006Posts: 6966 Location: porcelain throne
apparently you have a NULLable column?
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10886 Location: italy
no wonder Your support does not want to get involved!
did You check Your statement for typos ?
did You check for the correct column names ?
( i see quite a few duplicate names there )
Back to top
William Thompson Global Moderator Joined: 18 Nov 2006Posts: 3156 Location: Tucson AZ
My goodness, that is one ugly insert......
Back to top
dbzTHEdinosauer Global Moderator Joined: 20 Oct 2006Posts: 6966 Location: porcelain throne
is IHD_D a nullable column
if not, you have forgotten a value.
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10886 Location: italy
I had noticed that too, but I was more curious about the duplicate column names
never used it, nor seen it
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19243 Location: Inside the Matrix
Quote:
Fot security reasons
There is percieved security in confusion and non-readability. . .
Back to top
soumen2255 New User Joined: 25 Jun 2008Posts: 24 Location: Pune
dbzTHEdinosauer wrote:
is IHD_D a nullable column
if not, you have forgotten a value.
Yes the column is nullable and the two column names are NOT identical,I am extreamly sorry that while sanitising the data it was a mistake on my part to put identical column names...
Please help..
Back to top
dbzTHEdinosauer Global Moderator Joined: 20 Oct 2006Posts: 6966 Location: porcelain throne
we spend 10 posts trying to get info to help you
and then all you provide is garbage............
Back to top
daveporcelan Active Member Joined: 01 Dec 2006Posts: 792 Location: Pennsylvania
soumen2255,
Do you understand the problem here?
You have a SYNTAX ERROR in your insert statement.
Nobody here can help you if:
1) You can not give the actual statement (for security purposes of course)
2) Give a santisized version of the statement (it has now been changed)
Even so, the actual (not santized) and complete error message is what really is required.
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19243 Location: Inside the Matrix
Hello,
What happens if you execute this using only the first 10 columns and associated values? The next 10? etc. . .
Shoot the author. . .
d
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19243 Location: Inside the Matrix
Oops. . . My bad
Forgot where i was and fell back to a method used in a prior life. . .
Sorry for the mis-cue, and thanks to DBZ for reminding me,
d
Back to top
dbzTHEdinosauer Global Moderator Joined: 20 Oct 2006Posts: 6966 Location: porcelain throne
wait until soumen2255 finally bothers to correct his sql,
gets past the -104
and then runs into RI Violations!!!!
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10886 Location: italy
Quote:
For security reasons I cannot post the insert statement
given the names of the columns I would say ... security by obfuscation
such poor/confusing naming conventions are prone to cause lots of pain to the developers
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19243 Location: Inside the Matrix
And any clients/users who are supposed to create ad-hoc queries. . .
Back to top
GuyC Senior Member Joined: 11 Aug 2009Posts: 1281 Location: Belgium
you can not insert null like this
Code:
insert tab1(col1,col2,col3) values ('A',,'C')
Quote:
ILLEGAL SYMBOL ",". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: DEFAULT ( ? CURRENT_SCHEMA ROW CURRENT_LC_CTYPE XMLELEMENT. SQLCODE=-104, SQLSTATE=42601
but you can as follows
Code:
insert tab1(col1,col2,col3) values ('A',null,'C')
or
Code:
insert tab1(col1,col3) values ('A','C')
Back to top
soumen2255 New User Joined: 25 Jun 2008Posts: 24 Location: Pune
GuyC wrote:
you can not insert null like this
Code:
insert tab1(col1,col2,col3) values ('A',,'C')
Quote:
ILLEGAL SYMBOL ",". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: DEFAULT ( ? CURRENT_SCHEMA ROW CURRENT_LC_CTYPE XMLELEMENT. SQLCODE=-104, SQLSTATE=42601
but you can as follows
Code:
insert tab1(col1,col2,col3) values ('A',null,'C')
or
Code:
insert tab1(col1,col3) values ('A','C')
Thank You GUYC, I investigated and found that it is exactly what you have pointed is the issue.
Thanks everyone for this help and sorry once again for the confusion.
Back to top
Please enable JavaScript!