SQL Insert statements can't have a FROM clause in them...that could be an
issue!

> -----Original Message-----
> From: Robert Orlini [mailto:[EMAIL PROTECTED]] 
> Sent: 28 May 2002 16:47
> To: CF-Talk
> Subject: populate a table
> 
> 
> Hello,
> 
> If a user selects a vendor from a drop-down list, I want to 
> populate a form and main table called "purchases" with the 
> info from the vendor data that I have in stored in another 
> table called "vendor". Here is some of the code that checks 
> the option field in the drop-down menu. I get a syntax error 
> with this though.
> 
> Any better way?
> 
> Robert O.
> 
> <CFIF selectvendor is not "New Vendor">
> <cfquery name="addvendor" datasource="purchases">
> INSERT INTO purchases (
> vendor,
> Contact,
> Address)
> VALUES (
> '#FORM.vendor#',
> '#FORM.contact#',
> '#FORM.Address#')
> from selectedvendor
> </cfquery>
> </CFIF> 
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to