The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [OT] Calling SQL gurus..



thinking about it , yes I think you need to remove the brackets
in oracle too. oops


-----Original Message-----
From: Tony Butler [mailto:lists@xxxxxxx]
Sent: Thu 07/08/2003 13:16
To: ukha_d@xxxxxxx
Cc:
Subject: RE: [ukha_d] [OT] Calling SQL gurus..



Leave off the brackets around the select bit and you're away in SQL
Server....
Quoting aashram <groups@xxxxxxx>:

> in oracle and I suspect in standard sql
> you just do this
>
>
> INSERT INTO table2 (field1,field2,field3)  (SELECT 'abc',value1,value2
FROM
> table1 WHERE value3 = 'xyz')
>
>
> -----Original Message-----
> From: kinchyuk [mailto:alex@xxxxxxx]
> Sent: Thu 07/08/2003 12:42
> To: ukha_d@xxxxxxx
> Cc:
> Subject: [ukha_d] [OT] Calling SQL gurus..
>
>
>
>       Hi,
>
>       I'm trying to do a SQL insert on MS SQL 2000 that does a select
query
>       to insert a couple of fields in the record. Something like:
>
>       SELECT value1,value2 FROM table1 WHERE value3 = 'xyz'
>       INSERT INTO table2 (field1,field2,field3) VALUES ('abc',(value1
from
>       select),(value2 from select))
>
>       Help!
>
>       Alex
>
>
>
>       ** UKHA2004 BE THERE! ** - start planning now.
>
>       http://www.automatedhome.co.uk
>       Post message: ukha_d@xxxxxxx
>       Subscribe:  ukha_d-subscribe@xxxxxxx
>       Unsubscribe:  ukha_d-unsubscribe@xxxxxxx
>       List owner:  ukha_d-owner@xxxxxxx
>
>       Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ** UKHA2004 BE THERE! ** - start planning now.
>
> http://www.automatedhome.co.uk
> Post message: ukha_d@xxxxxxx
> Subscribe:  ukha_d-subscribe@xxxxxxx
> Unsubscribe:  ukha_d-unsubscribe@xxxxxxx
> List owner:  ukha_d-owner@xxxxxxx
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>





Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.