software used :sqlserver 2000 SP4,vb sp6 The follwing code works fine for select and update accordingly. I need to know if there is a single sql query to do both together i.e. select and update as a single query and not like two sql statements as below.