Inserting records into 2 identical fields at once (???)

  • Thread starter Thread starter Chumley the Walrus
  • Start date Start date
C

Chumley the Walrus

I want to insert records into two tables with identical fields at
once, the below sql string is giving me an error at the comma " , "
between tblProline and Prolinebup, the 2 tables i want to insert into:

''''
Insert into tblProline,Prolinebup (showdate, hand1, elements1) values
(@showdate, @hand1, @elements1)

'''''


????
chumley
 
I want to insert records into two tables with identical fields at
once, the below sql string is giving me an error at the comma " , "
between tblProline and Prolinebup, the 2 tables i want to insert into:

''''
Insert into tblProline,Prolinebup (showdate, hand1, elements1) values
(@showdate, @hand1, @elements1)

I'm not surprised! Change your SQL to the following:

Insert into tblProline (showdate, hand1, elements1) values (@showdate,
@hand1, @elements1)
Insert into Prolinebup (showdate, hand1, elements1) values (@showdate,
@hand1, @elements1)
 
Back
Top