Reply to Re: Insert based on a select query

Your name:

Reply:


Posted by Mintyman on 09/20/05 15:55

Hi Jens,

Thanks for the quick reply. Your help is much appreciated. What would I need
to do in order to insert the results into a table called 'temp' that resides
in a different database e.g. Logi?

Thanks

"Jens" <Jens@sqlserver2005.de> wrote in message
news:1127219694.666930.255500@f14g2000cwb.googlegroups.com...
> INSERT INTO Temp
> select products.name, products.notes, products.purchase_date,
> products.serial_no, products.total_value, products.product_code,
> products.quantity, products.product_group, products.lhs1_name,
> lhs1.department, lhs1.address1, lhs1.city, lhs1.country
> from products, lhs1
> where products.lhs1_id = lhs1.id
>
> if it does not exists at runtime:
>
> SELECT
> products.name, products.notes, products.purchase_date,
> products.serial_no, products.total_value, products.product_code,
> products.quantity, products.product_group, products.lhs1_name,
> lhs1.department, lhs1.address1, lhs1.city, lhs1.country
> from products, lhs1
> where products.lhs1_id = lhs1.id
> INTO Temp
>
>
> HTH, Jens Suessmeyer.
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация