Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
melcraig
Starting Member
39 Posts |
Posted - 2006-09-19 : 14:48:00
|
I have two tables: Reservations and tickets.I want the value(5) to go into the RID along with the ticket, table, menu from ticketsINSERT INTO reservations (RID, Ticket, Table, Menu) VALUES (5, (SELECT Ticket, Table, Menu FROM Tickets WHERE Session = 2 ) )I don't know how to do this to make it work. Please helpThanks, Mel |
|
Gopi Nath Muluka
Starting Member
22 Posts |
Posted - 2006-09-19 : 15:06:25
|
try thisINSERT INTO reservations (RID, Ticket, Table, Menu) SELECT 5, Ticket, Table, Menu FROM TicketsWHERE Session = 2Thanks,Gopi Nath Muluka |
 |
|
melcraig
Starting Member
39 Posts |
Posted - 2006-09-19 : 15:30:57
|
Thanks, that worked great.Mel |
 |
|
|
|
|
|
|