Hi guys,
I was wondering, I have an SQL statement which was dynamically created and which I have stored as such:
Set Qds = DBs.querydefs("PT_query")
Qds.SQL= strSQLQuery
Qds.returnsrecords = True
Qds.Close
That works fine.. Then I delete the contents of a table:
currentDB.Execute "DELETE FROM TableA"
That also works, but straight after that I want to insert into the deleted table:
currentDB.Execute "SELECT pt_query.* INTO TableA from pt_,query"
That doesn't work, it complains that TableA already exists. I'm just thinking, of course it exists, you just deleted the content and it needs to exist to be able to fill it. What am I doing wrong?
I was wondering, I have an SQL statement which was dynamically created and which I have stored as such:
Set Qds = DBs.querydefs("PT_query")
Qds.SQL= strSQLQuery
Qds.returnsrecords = True
Qds.Close
That works fine.. Then I delete the contents of a table:
currentDB.Execute "DELETE FROM TableA"
That also works, but straight after that I want to insert into the deleted table:
currentDB.Execute "SELECT pt_query.* INTO TableA from pt_,query"
That doesn't work, it complains that TableA already exists. I'm just thinking, of course it exists, you just deleted the content and it needs to exist to be able to fill it. What am I doing wrong?