SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Threaded View
-
Feb 9, 2005, 03:15 #1
- Join Date
- Jul 2004
- Location
- Nigeria
- Posts
- 1,737
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
inserting into a db, from multiple tables
hello,
I have an insert SP as below
Code:insert into accounting (item, price, quantity, purchaseID, username) select item1, price1, quantity1 from Accounting where userID = @user
e.g. something like this;
Code:insert into dbo.accounting (item, price, quantity, purchaseID, username) select item1, price1, quantity1 from dbo.Accounting where userID = @user , dbo.users purchaseID, username INNER JOIN dbo.Users ON dbo.accounting.username = dbo.Users.username
thanks
Afrika
Bookmarks