Is it possible when coding a SQL statement to use variables within an
INSERT INTO statement i.e the variables contain some data I wish to
insert along with the standard entity.attribut e data?
E.G.
2 Entites/Tables, tblA and tblB. Both have the same Attributes/fields
'Fname' and 'Lname. So my SQL statement looks like this:-
"INSERT INTO tblB (Fname, Lname) SELECT tblA.Fname FROM tblA
WHERE tblA.Fname='" & strFname & "' VALUES(" & strLname & ");"
So I know that the WHERE clause works using the variable 'strFname' as
a container for the search criteria but is there a way of getting the
variable 'strLname' to insert with the rest of the data?
Any help would be appreciated
Cheers,
Kelvin
INSERT INTO statement i.e the variables contain some data I wish to
insert along with the standard entity.attribut e data?
E.G.
2 Entites/Tables, tblA and tblB. Both have the same Attributes/fields
'Fname' and 'Lname. So my SQL statement looks like this:-
"INSERT INTO tblB (Fname, Lname) SELECT tblA.Fname FROM tblA
WHERE tblA.Fname='" & strFname & "' VALUES(" & strLname & ");"
So I know that the WHERE clause works using the variable 'strFname' as
a container for the search criteria but is there a way of getting the
variable 'strLname' to insert with the rest of the data?
Any help would be appreciated
Cheers,
Kelvin
Comment