Home » SQL & PL/SQL » SQL & PL/SQL » string concatenation
string concatenation [message #37517] Tue, 12 February 2002 18:58 Go to next message
diaz
Messages: 58
Registered: October 2001
Member
hi,

sorry for this silly question..
i'm already dizzy bout concatenating string..
how am i going to do this ;
select * from test where id='1'
^^^^^^
i always come up with one quote only .. the last quote doesn't appear.

id='&1';
sql_tg := 'select * from test where id='' ||id|| '' ;

pls help,
i already try with many quotes..
thanks
Re: string concatenation [message #37524 is a reply to message #37517] Wed, 13 February 2002 00:40 Go to previous message
Manoj Kumar
Messages: 5
Registered: February 2002
Junior Member
you can use like this

declare
a varchar2(20);
x varchar2(100);
begin
a:='&a';
x :='select * from tab where tname = '||chr(39)||a||chr(39);
dbms_output.put_line(x);
end;
Previous Topic: Difference between 'exists' and 'in'
Next Topic: difficulty Framing a query
Goto Forum:
  


Current Time: Fri Apr 26 03:16:27 CDT 2024