run as one sql statement
update tbl_products
set status='Current'
from tbl_prices
inner join tbl_products on tbl_products.modelnumber = tbl_prices.modelnumber
where tbl_products.status='Archi
so u'll only be using one recordset as so, rather than 2
set rs1 = cn1.execute("update tbl_products set status='Current' from tbl_prices inner join tbl_products on tbl_products.modelnumber = tbl_prices.modelnumber where tbl_products.status='Archi
Main Topics
Browse All Topics





by: angelIIIPosted on 2007-05-22 at 08:22:38ID: 19134716
I think you can make the update in 1 single sql:
<%
cn1.execute("update p set status='Current' from tbl_products p join tbl_prices pr on p.model_number = pr.model_number and pr.status = 'Current' and p.status = 'Archive' ")
%>