Print Page | Close Window

INSERT INTO SELECT AND WHERE

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=7274
Printed Date: 30 March 2026 at 8:41am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: INSERT INTO SELECT AND WHERE
Posted By: fark
Subject: INSERT INTO SELECT AND WHERE
Date Posted: 14 November 2003 at 10:15am

I need to do this:

strsql="INSERT INTO tempUPS (ShpPrimary, m_amount, m_amountActual, m_serviceType) IN 'C:\Shipping Database\temp.mdb' SELECT m_primaryKey, m_amount, m_amountActual, m_serviceType  FROM calShipment, tempUPS WHERE tempUPS.PkgForeign = calShipment.m_foreignKey;"

The above statement gives this error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e37'

[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'tempUPS'. Make sure it exists and that its name is spelled correctly.

/ups.asp, line 22

How do I make sure that the Driver knows where to find the tempUPS table used in the first part of the INSERT Statement???  Thanks




Replies:
Posted By: michael
Date Posted: 14 November 2003 at 11:33am
You need to connect to the database that has the table. And why do you open a new thred? You were discussing the same thing in your previous thread.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net