I am trying to do 2 inserts in a stored proc. One is straight forward. The other is an insert into Table A from values in Table B. Here is my code. While the first part works well it does not seem to read the values from Table B...
<CODE
BEGIN
INSERT INTO TableA
(LocationID, SeatID, SeatNumber, DateScheduled)
VALUES
(1, 12, 109, 9/26/2007)
END
BEGIN
INSERT INTO TableA
(StartTime, EndTime)
--using "Values keyword throws an error)
SELECT StartTime, EndTime FROM TableB
WHERE LocationID = 1
END
GO
I tried combining the two INSERTs into one statement... didn't work!
Thanks for your help!!:)
Phoenix
<CODE
BEGIN
INSERT INTO TableA
(LocationID, SeatID, SeatNumber, DateScheduled)
VALUES
(1, 12, 109, 9/26/2007)
END
BEGIN
INSERT INTO TableA
(StartTime, EndTime)
--using "Values keyword throws an error)
SELECT StartTime, EndTime FROM TableB
WHERE LocationID = 1
END
GO
I tried combining the two INSERTs into one statement... didn't work!
Thanks for your help!!:)
Phoenix
Comment