Combinig Queries

k209310

Registered User.
Local time
Today, 16:55
Joined
Aug 14, 2002
Messages
184
Is it possible to comnbine two queries such as

INSERT INTO tblTest
SELECT *
FROM Tbl1
WHERE [tblID]=1

and

INSERT INTO tbl1 ( [tblID] )
WHERE ( [tblID] ) = ( [tblID )
SELECT '" & ([tblID]) & "B' AS [tblID];

the first query inserts a line and the second inserts a new ID in to a line.

However i need the new ID to be inserted in to the same line as is inserted in the first query at present the new id is entered in to a completely without any other data.
 
If you don't want to insert two rows, don't do two INSERT INTO queries. Make the second one an UPDATE.
 

Users who are viewing this thread

Back
Top Bottom