Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #840
| From | "Bob Barrows" <reb01501@NOSPAMyahoo.com> |
|---|---|
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: how to insert values in two table with single query |
| Date | 2011-11-24 10:37 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <jaloe3$2u7$1@dont-email.me> (permalink) |
| References | <3dd607ca-010c-4e49-bde8-cef2d1ec603d@z22g2000prd.googlegroups.com> <Xns9FA79778F9AC4Yazorman@127.0.0.1> <3fb935f1-74a1-458e-a7bf-709c9fee37ce@e12g2000pri.googlegroups.com> |
Pab wrote:
> sorry,
> this is the query
>
> BEGIN TRANSACTION
> DECLARE @salid int
> Insert into sal_products
> (upc,store_area,shelf_number,aisle_no,section_aisle,location) values
> ('123asd','N/A','N/A','N/A','N/A',100)
> select @salid = scope_identity()
> insert into sal_product_locations (sal_product_id,side,position)
> values (@salid,'N/A','N/A')
> commit
>
> thanks,
> -pab
... and ....
What happens when you try to run it??
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Next in thread | Find similar
how to insert values in two table with single query Pab <prabu.net88@gmail.com> - 2011-11-24 05:27 -0800
Re: how to insert values in two table with single query Erland Sommarskog <esquel@sommarskog.se> - 2011-11-24 13:53 +0000
Re: how to insert values in two table with single query Pab <prabu.net88@gmail.com> - 2011-11-24 06:13 -0800
Re: how to insert values in two table with single query "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2011-11-24 10:37 -0500
Re: how to insert values in two table with single query Erland Sommarskog <esquel@sommarskog.se> - 2011-11-24 23:35 +0100
Re: how to insert values in two table with single query --CELKO-- <jcelko212@earthlink.net> - 2011-11-25 08:22 -0800
csiph-web