Up Prev Next
From: Shankar Kris <kris at japan dot sbi dot com>
Subject: Framing search sql's
Date: Feb 2 1996 1:57AM
I maintain a list that has *data* on which to search for.
@list = qw( 1 2 3 4 5);
I frame the 'sql' like this:
$sql = "select col1,col2 from table_name where col1 in (@list)";
This works fine when the search list involves integer data types.
While searching for char data types. since each element has to enclosed
in quotes. I am unable to come up with a simple elegant way to frame the
search 'sql'. Is there a good way to do this. else I might just loop
thru eeach element and frame the sql.