Hy...
am having a query regarding updating a table A records from table b on a button click...
have created connection sting and commandtext to exexute d query
am tryn ds query bt it seems to throw some syntax error
basically the fields are same bt the stockno_temp_co py is a temporary table which i want to empty always while it updates all the table records to stockno_table.. .
all the records except the Sold which is YES/NO field changes...
NB: Access DB is used
Please advice me on this...
Thanx,
Mdoc
am having a query regarding updating a table A records from table b on a button click...
have created connection sting and commandtext to exexute d query
am tryn ds query bt it seems to throw some syntax error
Code:
cmd.CommandText = "UPDATE stockno_table SET(product_id,Sold,Rec_No) =(SELECT product_id,Sold,Rec_No from stockno_temp_copy where stockno_temp_copy.stock_no=stockno_table.stock_no) where(exists)(stockno_table.stock_no=stockno_temp_copy.stock_no)"
all the records except the Sold which is YES/NO field changes...
NB: Access DB is used
Please advice me on this...
Thanx,
Mdoc
Comment