>Is it possible to create a temporary table on Oracle thru. an SQL select in VFP and use the table in subsequent queries?
>I do not want to drag the SQL results down everytime as they could be quite large and I want the results to be used on subsequent queries.
>
>I just can't seem to figure this out. Any help will be appreciated.
>
>Rakesh.
Hi Rakesh,
You can create SQL View on Oracle database instead of bringing down
the whole data set. This View can be easily used in subsequent queries. Please
go through the following.
lnhandle = SQLCONNECT()
?SQLEXECUTE(lnhandle,"CREATE VIEW myview AS SELECT cid,SUM(namount) AS nTotal FROM mytable")
?SQLEXECUTE(lnhandle,"SELECT cInvNo,nTotal FROM myview,mytable WHERE myview.cid = mytable.cid")
?SQLEXECUTE(lnhandle,"DROP VIEW myview")
?SQLDISCONNECT()
BTW, Are you from India?
Regards,
Jayesh
- Jayesh