Hi Bhavbhuti,
If is only one record in cursor, you can use "?"..
?SQLEXEC(handle,"select * from table where id=?localcursor.id")
If are in local curosr more records, you have two choises
- generate IN (id1,id2)
- or create temporaly table and upload records from local cursor to temporaly table
?SQLEXEC(handle,"create table #temptab ( id int)")
?SQLPREPARE(handle,"INSERT INTO #temptab (id) values (?locacursor.id)")
SELE localcursor
SCAN ALL
?SQLEXEC(handle)
ENDSCAN
MartinJ
>Hi all
>
>I have a local cursor which contains iID's for the records I want to get using SQL Pass Thru. I have used SQL PT with private variables using "?". How can I get the SQL PT to WHERE on a local cursor?
>
>Please advise.