INSERT INTO StatusList ( DatabaseName, TableName, ImportStatus )
VALUES ( "db1", "table1", IIf((SELECT COUNT(*) FROM table1) < 1,"Failed","Ok"));
I have several databases that imports several tabels on a weekly basis and I'm constructing a macro to import all the tables at once.
I have one database with links to all tables that the data will be imported to.
I want the question above to update the table "StatusList" with the databasename, tablename and if the import was successfull. If there are zero rows in the table the import failed.
I get a:
"Reserved error (-3025); there is no message for this error"
When i try to run the question, why?
I can always do it in VB nut I'm sure it's doable in SQL.