sqlexec(han,"select cus_id into #temp from customer where 1 = 0")now populate the #temp table created on the sqlserver with the cus_id which u have.
sqlexec(han,"select customer.* from customer inner join "+; "#temp on customer.cus_id = #temp.cus_id","cursor")Well a round a way approach but helps.