Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Into statement

Status
Not open for further replies.

Lhuffst

Programmer
Jun 23, 2003
503
US
I pass an sql statement via code using the

ssql = Select Field, Field, Field
Into tblreportrecords
from tblname
where


This has worked fine for the last 4 weeks - it was reacting as I expected. It deleted all of the records in the table each time that the ssql was run leaving the structure behind. Today all of the sudden, it has started deleting the records as well as the structure. Without the structure to pass the records each run, I can not execute reports as they are dependent on the resultant table. Any ideas would be very helpful.
Lhuffst
 
That is a make-table query and will delete the entire table each time it is run. Make sure that there is data being returned from the query to put into the table. I would run the query with the "into tblreportrecords" removed just to ensure that there is data being returned.
 
Thank you so much. If I dont' have any records, that's when it must be deleting the table. I will try to pass a dummy record in that case. Thanks again, I'm sure you solved the puzzle.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top