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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with heterogeneous insert query.

Status
Not open for further replies.

BazookaJo

Programmer
Jan 16, 2004
7
GB
Have used heterogeneous queries successfully before but cannot understand why the following doesn't work.

INSERT INTO ":SQLSRVR:Table1" (Members_Code)
SELECT Members_Code FROM ":localStuff:Table2"

SQLSRVR is the SQL Server defined via the ODBC.
LocalStuff is the database for local Paradox tables.

The query runs without errors, but the number of records inserted into Table1 is ZERO regardless of how many records are in Table2.

Regards - Paul.
 
Paul,

Not sure why it doesn't work either, as it seems like it should, but you might try breaking the problem into smaller chunks and see if one of those fail.

For example, try selecting your MEMBERS_CODE from table 2 and see how many matches there are.

If there are, then try manually inserting those into your SQL server, just to verify that the insert works as desired.

Seems basic, I know, but there are many times when basic troubleshooting helps...

Hope this does,

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top