I'm trying to set up a DTS package on an MS SQL Server that will run at timed intervals to grab data out of an AS/400 table. I have an ODBC Data Source from HIT Software that talks to the AS/400.
Only a small number of records are actually added to the AS/400 table for a given time period so I'm trying to use a JOIN query in the DTS to give me only the stuff the MS SQL Server doesn't have. I can't figure out the syntax for using an AS/400 table and a SQL table in the JOIN query. I really don't know if this is even possible.
If it were two SQL tables the query would be:
SELECT * FROM Table1 LEFT JOIN Database1..Table2 ON (Table1.CommonField=Database1..Table2.CommonField) WHERE Database..Table2.CommonField IS NULL
This query would return only the data not common to the two tables, in my case any new records added since the last DTS. The Database..Table.Field notation doesn't seem to work. I get a DTS error message that "Token . was not valid" How do you do call the Database/Table from a completely different server, in this case the AS/400 in a DTS query? Any suggestions?
Only a small number of records are actually added to the AS/400 table for a given time period so I'm trying to use a JOIN query in the DTS to give me only the stuff the MS SQL Server doesn't have. I can't figure out the syntax for using an AS/400 table and a SQL table in the JOIN query. I really don't know if this is even possible.
If it were two SQL tables the query would be:
SELECT * FROM Table1 LEFT JOIN Database1..Table2 ON (Table1.CommonField=Database1..Table2.CommonField) WHERE Database..Table2.CommonField IS NULL
This query would return only the data not common to the two tables, in my case any new records added since the last DTS. The Database..Table.Field notation doesn't seem to work. I get a DTS error message that "Token . was not valid" How do you do call the Database/Table from a completely different server, in this case the AS/400 in a DTS query? Any suggestions?