Anybody have a clue what is wrong with this,I
keep geting told that there is a semicolon missing.
CFQUERY NAME="2"
DATASOURCE="perspectives"INSERT INTO
questiontest(question)VALUES('#Form.question#')UNIONINSERT INTO
questiontest(Cat_num)Select Cat_NumFrom CategoriesWhere
Take
the UNION out of your query. Union is a function for combing the results
of two or more queries. It has no practical purpose for inserting data
into a database. Your query should run fine without the UNION
-Original Message-From: [EMAIL PROTECTED]
[mailto:[EMAIL
No good. I should have explained better. I need to
throw information collected from a form into fourrelated tables. I cannot
find anykind of example to do this.The problem I am running into is
I have four statements wrapped in cftransaction tags but each
insertstatement is creating its own
Try doing a select on the column you need and using the result when you
insert into the 2nd table.
Ryan
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Adaryl Wakefield
Sent: Tuesday, July 31, 2001 4:38 PM
To: [EMAIL PROTECTED]
Subject: Re: [KCFusion]
Thats the easy part. How you get form data for the second column to go with
it?
A.
- Original Message -
From: Ryan Hartwich [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 31, 2001 4:43 PM
Subject: RE: [KCFusion] debugging
Try doing a select on the column you need and using
It struck me like lightning what Ryan was trying to say 15 seconds before
Ryan emailed me, but I did not know the use of cftry and cfcatch so you both
helped. It works now. That has been bothering me for 3 days. You guys are an
awsome resource! Thanks for the input.
A.
- Original Message
Don't forget, you can also do a select on the key/primary table and then do
a RecordCount on the query. If you have 0 rows returned then the value
doesn't exist and you don't want to insert. If it does exist you can then
use the value
Glad to be of assistance,
Ryan