Reply to Re: Insert based on a select query

Your name:

Reply:


Posted by Jens on 09/20/05 15:34

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

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