sqlexec(han,"select cus_id into #temp from customer where 1 = 0") && would create a temp table on the server which would be droped when the connection closes or u drop it. ** Now populate this table sqlexec(han,"select * from #temp","temp") ** set biffering to table cursorsetprop("buffering",5,"temp") ** now populate the temp table created on the sqlserver with the cus_id which u have. select localcursor scan insert into temp values(localcursor.cus_id) endscan *******make this updatable cursorsetprop("tables","#temp","temp") cursorsetprop("UpdateNameList","cus_id #temp.cus_id","temp") cursorsetprop("UpdatableFieldList","cus_id","temp") cursorsetprop("KeyFieldlist","cus_id","temp") cursorsetprop("Sendupdates",.t.,"temp") tableupdate(2,.t.,"temp") ** use inner join to retrive the recordset sqlexec(han,"select customer.* from customer inner join "+; "#temp on customer.cus_id = #temp.cus_id","MYcursor") sqlexec(han,"drop #temp") && drop the tablethe MYcursor is populated with the records u want. also u can make the Mycursor updatable further use.