Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL 2000 INSERT Statement 1

Status
Not open for further replies.

BillBrosius

Programmer
Jan 9, 2003
33
US
Is it possible to use the INSERT INTO statement in a stored procedure that would include a both a SELECT statement and static values? For example,

INSERT INTO #table1 (Field1) VALUES ("CASH")
INSERT INTO #table1 (Field2,Field3,Field4)
Select field2,field3,field4 From table2

Can the above INSERT Statements be combined into one statement to form one record?

Thanks.
 
Code:
INSERT INTO #table1
SELECT 'cash', field2, field3,field4
FROM table2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top