Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #840
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | "Bob Barrows" <reb01501@NOSPAMyahoo.com> |
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: how to insert values in two table with single query |
| Date | Thu, 24 Nov 2011 10:37:26 -0500 |
| Organization | A noiseless patient Spider |
| Lines | 21 |
| 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> |
| Injection-Date | Thu, 24 Nov 2011 15:38:44 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="vQmQhKLKuh0OvmkK+suVIw"; logging-data="3015"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1///entXwr6P6rZQNB6I82dG+1lAr8R6go=" |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.6157 |
| X-RFC2646 | Format=Flowed; Original |
| X-Antivirus-Status | Clean |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5931 |
| X-Antivirus | avast! (VPS 111124-0, 11/24/2011), Outbound message |
| Cancel-Lock | sha1:PC58qxIQoZuCCqab6CRua0jiZJo= |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| Xref | x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:840 |
Show key headers only | View raw
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