macromedia.coldfusion.getting_started
[Top] [All Lists]

cfquery inserting multiple values into tables?

Subject: cfquery inserting multiple values into tables?
From: "david3233"
Date: Sat, 26 Apr 2008 23:45:07 +0000 UTC
Newsgroups: macromedia.coldfusion.getting_started

Hi
 I am extremely new to CF and I am stuck.  I have queries to inserts data into 
to multiple tables which works fine in SQL plus, but when I try it using a cold 
fusion form, it doesn't work and I get the error noted below.   
 The RelNo.NEXTVAL and RelNo.CURRVAL are the primary keys in the two noted 
tables so that that the number is the same in both tables.  I tried breaking it 
into 2 cfquery, but it didn't work.  Any suggestions would be helpful.  Thanks.
                 David


  Error Executing Database Query.
 [Macromedia][SequeLink JDBC Driver][ODBC Socket][Oracle][ODBC][Ora]ORA-00933: 
SQL command not properly ended
  
 The error occurred in C:\ColdFusion8\wwwroot\dbclass2\newdonorinsert.cfm: line 
11

 <cfquery name="new_donor_input" datasource="dbclass2" username="dbclass206">
        INSERT INTO legal_entity VALUES 
     (RelNo.NEXTVAL,'#FORM.legal_entity_type#') 
     INSERT INTO person VALUES
     
(RelNo.CURRVAL,'#FORM.person_firstname#','#FORM.person_lastname#','#FORM.person_
dob#','#FORM.person_salary#')


<Prev in Thread] Current Thread [Next in Thread>