FosPro code equivalent in SQL

livvie

Registered User.
Local time
Today, 23:44
Joined
May 7, 2004
Messages
158
FoxPro code equivalent in SQL

This is a FoxPro command I need to know anything that will do the same thing in SQL.

select * from ctmat where ctmat.est_id == ctest.est_id into table c:\temp\ecopy_a.dbf
 
Last edited:
I believe you can use these, don't hold me to 'em but it might work.

This is more of a make table query in SQL:

SELECT * INTO ctest IN 'path_to_DB' FROM ctmat WHERE ctmat.est_id = ctest.est_id;

This is more of an append query in SQL:

INSERT INTO ctest IN 'path_to_DB' SELECT * FROM ctmat WHERE ctmat.est_id = ctest.est_id;

I think these will work. The only part I am unsure about is the where clause. I don't know if SQL can see the table in the other DB this way. If anybody else has any ideas please post so I will know as well.
 
This is what I did and it works
SQL = "INSERT INTO SQLACCESS.temptblctest " & _
"( Drawingid, cid, CTDNumber, Revision, custom, prepdate, prepby, " & _
" SELECT Drawingid, cid, CTDNumber, Revision, custom, prepdate, prepby, " & _
" FROM SQLACCESS.tblctest " & _
" WHERE est_id = " & MyId

DoCmd.RunSQL (SQL)
 

Users who are viewing this thread

Back
Top Bottom