View Single Post

  #1 (permalink)  
Old 10-26-2007
kath
 
Posts: n/a
Default how to compare array of String with column of a table

Hi,

i have a array of string(say array is of length 1000). I want to
compare those string in array with one table column
- whether that table column has a string
if yes
do nothing.
if no
then insert that string into table.
- whether table has obsolete row i.e, the one present in table and
not in array
then delete that row.

How do i go about this, because i see, it is not feasible to loop
through array and search table to find new string OR loop through each
row from table to find some obsolete row

How can i accomplish this task more feasibly(without running query for
each string, for comparission)? Is there any way to find this kind of
problem. I would have been easy if i had to compare two tables(with
UNION and INTERSECT), but it is not the case.


thanks,
kath.

Reply With Quote