View previous topic :: View next topic |
Author |
Message |
rameshb Beginner
Joined: 12 May 2006 Posts: 10 Topics: 6 Location: india
|
Posted: Wed Sep 19, 2007 11:50 am Post subject: Maximum length of string we can give in IN predicate |
|
|
hi,
i have a scenario where i need to pass the String of length 2000 bytes
in IN predicate of the SELECT statement
when i am doing the same i am getting SQLCODE = -134
can anyone tell me what is the maximum length of string i can give in IN predicate
Is there any way i can resolve this problem
thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Wed Sep 19, 2007 11:55 am Post subject: |
|
|
rameshb,
How are you passing the String? ex:
Code: |
ws-pass-string pic x(2000) value 'abcdefghijk....... 2000 byte'
|
and using that in select statement?
Code: |
select * from table where column in :ws-pass-string
|
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
rameshb Beginner
Joined: 12 May 2006 Posts: 10 Topics: 6 Location: india
|
Posted: Wed Sep 19, 2007 1:28 pm Post subject: |
|
|
i am passing through host variable
IN(ASN_STRG) like this where ASN_STRG is host variable
this host variable is coming like ABCDE,QBC,WER,....... LIKE THIS |
|
Back to top |
|
 |
Manas Biswal Intermediate

Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Thu Sep 20, 2007 2:09 am Post subject: |
|
|
rameshb,
It looks like there is a mismatch in the column data type and host variable structure that you are trying to use in your IN predicate.
If your column data type is VARCHAR, check that your host variable structurs is compatible. Trust you know the kind of host variable structure used for VARCHAR and you have a DCLGEN.
HTH...Regards,
Manas _________________ There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948) |
|
Back to top |
|
 |
|
|