[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

[sqr-users] Problem with SQR string concatenation ? Please help!



I formed a string concatenating few of the command
line arguments. I checked for the wellformedness of
the resultant string, it was exactly what I wanted..

I went into a procedure, there I concatenated the
string with parenthesis; it looked good. But, when I
try using this string inside sql select statement
(begin-select...end-select), it won't be
recognized..don't know why..

Code fragments:
>>>string<<<
$agycodes = 'A6'||','||'A7'||','||'M4' =>
'A6','A7','M4'
>>>inside procedure<<<
let $agycodes = '('||$agycodes||')'
#debug show $agycodes.....would give me
('A6','A7','M4') which is what I want.

>>>inside select statement<<<
begin-select
agy_wc &agywc
agt_wc &agtwc
agt_seq &agtseq
.....
.....
from t_agents .....
where
agy_wc = $agycodes and .....
.....
end-select

Works when I hard-code ('A6','A7','M4') in place of
$agycodes, but won't work otherwise. It won't give me
any error or exception, however the sqr will terminate
immediately, which makes it even more difficult to
debug..Any idea what's happening ? Is it something to
do with parens, commas ? Would really appreciate any
help..

Thanks in advance..

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users