Try changing your $Status variable to this:

my $Status  = '(' . '"' . join('","','New','Old') . '"' . ')';

that should give the results desired

hope it helps.

The Ghost wrote:
I want to pull some text from a database:

RxNumber in (select RxNumber FROM restoreReports WHERE Status in  $Status)

then I want perl to use this string and interpolate the variables ($Status).

so:

my $Status= "('New','Old')";
my $sql=get_SQL_String(); #will get 'RxNumber in (select RxNumber FROM restoreReports WHERE Status in $Status)'
....
....
something.....
print $sql;

# should print:

RxNumber in (select RxNumber FROM restoreReports WHERE Status in ('New','Old'))


What can I do?


--
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://thunder-rain.com/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to