Tuesday, March 27, 2012

DTS Execute SQL task on Access linked table

Can the DTS execute SQL task recognize a table in an Access database that is linked from another Access database?

I'm attempting to use a DTS Execute SQL task connected to Access1.mdb to make a new table in Access1.mdb that is using a Subquery from a linked table in Access2.mdb . (I know it sounds convoluded..) Its giving me an error in my FROM clause as if it can't recognize the linked table from Access2.mdb.

The reason why I'm doing this is that I'm not sure how to run an Access make table query from DTS that will overwrite the existing table in Access. I get an error that the table already exists.

Any Help?You can do testing in query analyzer by placing your select * from openquery statement. If it works in query analyzer then u could execute this sql statement in dts package.

By the way, since you are using DTS package, why not use MS Access connection which is more dynamic and stable than OpenQuery.

No comments:

Post a Comment