If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Invalid character found in a character string argument

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-30-11, 07:46
mitnix mitnix is offline
Registered User
 
Join Date: Sep 2011
Posts: 3
Invalid character found in a character string argument

Am getting this error while trying to insert but just selection is done i dont get any error.kindly help

Error code:
During SQL processing it returned:
SQL0420N Invalid character found in a character string argument of the
function "INTEGER". SQLSTATE=22018


Insert Query:
INSERT INTO ADW.ECOM_SES_REFL_W
(CKIE_SEQ_I,
LNK_I,
REFL_ECOM_BROW_KYWD_I,
GST_ENTR_ECOM_BROW_KYWD_I,
REFL_SRC_N,
REFL_KYWD_REF_I,
SGL_WBPGE_VIST_F ,
REFL_PROF_I,
UPDT_TS)
SELECT CKIE.CKIE_SEQ_I AS CKIE_SEQ_I,
ECOM.LID AS LNK_I,
KYWDE.ECOM_BROW_KYWD_I AS REFL_ECOM_BROW_KYWD_I,
KYWDS.ECOM_BROW_KYWD_I AS GST_ENTR_ECOM_BROW_KYWD_I,
ECOM.AFID AS REFL_SRC_N,
( CASE
WHEN Instr(ECOM.LID, 'p') = 0 OR TRIM(Translate(Substr(ECOM.LID, Instr(ECOM.LID, 'p') + 1),
' ','+-E.0123456789')) > ' ' OR ECOM.LID = '' THEN -1
ELSE Substr(ECOM.LID, Instr(ECOM.LID, 'p') + 1)
END ) AS REFL_KYWD_REF_I,
ECOM.BOUNCEACTIVITYFLAG AS SGL_WBPGE_VIST_F,
( CASE
WHEN Instr(ECOM.LID, 'p') = 0
OR TRIM(Translate(LEFT(Substr(ECOM.LID, 1, Instr(ECOM.LID, 'p')
),
LENGTH(Substr(ECOM.LID, 1,Instr(ECOM.LID, 'p')))- 1),
' ', '+-E.0123456789')) > ' ' OR ECOM.LID = '' THEN NULL
ELSE LEFT(Substr(ECOM.LID, 1, Instr(ECOM.LID, 'p')), LENGTH(
Substr(ECOM.LID, 1, Instr(ECOM.LID, 'p'))) - 1) END ) AS REFL_PROF_I,
CURRENT TIMESTAMP AS UPDT_TS
FROM ADW.EXTL_BROW_REFL_E ECOM
INNER JOIN ADW.ECOM_CKIE_SRC_KEY_LKUP CKIE
ON ECOM.TRACKINGIDSESSION = CKIE.TRAK_ID_SES_I
INNER JOIN ADW.ECOM_KYWD KYWDE
ON ECOM.LNM = KYWDE.KYWD_T
INNER JOIN ADW.ECOM_KYWD KYWDS
ON ECOM.SEARCHPHRASE = KYWDS.KYWD_T
WITH UR
Reply With Quote
  #2 (permalink)  
Old 09-30-11, 07:49
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
as the message indicates
SQL0420N Invalid character found in a character string argument of the
function "INTEGER". SQLSTATE=22018
and according the doc
The function function-name has a character string argument that contains a character that is not valid in a numeric SQL constant. The function may have been called as a result of using the CAST specification with function-name as the target data type. The function or data type used in the SQL statement may be a synonym for function-name.
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 09-30-11, 07:57
mitnix mitnix is offline
Registered User
 
Join Date: Sep 2011
Posts: 3
y am i getting this error even though am not doing any casting here!!.

how would i find if any character is going to integer columns.
Reply With Quote
  #4 (permalink)  
Old 09-30-11, 09:01
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
check that datatype of selected to insert data has the same datatype as target column
there is something called : pd/psi problem determination problem source identification

try to replace the select by export - insert by import
set commitcount to 1 and try to find the row
hopefully the error is in each record or near the start - otherwise it can take some time
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On