Update SQL with variable

ijit

Registered User.
Local time
Today, 10:05
Joined
Oct 17, 2007
Messages
15
I would like to write an INSERT INTO SQL that contains both a variable and field reference. Something like this:

"INSERT INTO Table1 ([Field1],[Field2],[Field3]) SELECT " & Var1 & "([Field2],[Field3] FROM Table2 WHERE [Field4] = n"

Is something like this possible?
 
Hi..

can use this way with vba..:

currentdb.execute "INSERT INTO Table1 ([Field1],[Field2],[Field3]) SELECT '" & var1 & "'" & " ,[Field2],[Field3] FROM " & _
"Table2 WHERE [Field4] = n "
 

Users who are viewing this thread

Back
Top Bottom