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?

Reply via email to