Simple error (so I didn't even read the code that generates this - there may 
be others) - You're using double quotes for "current". You need to use 
single quotes.

On 9/15/05, Daniel Kessler <[EMAIL PROTECTED]> wrote:
> 
> I am using Oracle and I have an insert where the first few columns
> are defined and then the last 9 columns are pulled in through a text
> delimited file. I am receiving the error:
> [Oracle]ORA-00984: column not allowed here
> INSERT INTO grants_contracts ( g_c_id,date_added,status,
> account_number,proposal_id, funding_agency,agency_contract_number,
> id,title, funding,start_date, end_date ) VALUES (
> unique_g_c_num_s.NEXTVAL,SYSDATE,"current" , (param 1) , (param 2) ,
> (param 3) , (param 4) , (param 5) , (param 6) , (param 7) , (param 8)
> , (param 9) )
> 
> 
> 
> I can't seem to see the error. The code that generates it is pretty
> lengthy. Here it is:
> 
> 
> <CFQUERY NAME="add_item" DATASOURCE="dpch">
> INSERT INTO grants_contracts
> (
> g_c_id,date_added,
> account_number,proposal_id,
> funding_agency,agency_contract_number,
> id,title,
> funding,start_date,
> end_date,abstract,
> related_file,status
> VALUES
> (
> unique_g_c_num_s.NEXTVAL,SYSDATE <!--- SYSDATE comma is
> provided by following cfqueryparams --->
> <cfloop from="1" to="#arrayLen(tmp_ar)#" index="gg">
> <cfset error_ar = arrayNew(1)>
> <cfif tmp_ar[gg] EQ 'null'><cfset tmp_ar[gg] = ''></cfif>
> 
> <!--- special cases --->
> <cfswitch expression="#gg#">
> <cfcase value="5,7" delimiters=",">
> <cfif gg EQ 5>
> <!--- FORMAT: Ennis, Catherine D. --->
> <cfset the_name = listToArray(tmp_ar[gg],",")>
> <cfset lname = the_name[1]>
> <!---
> get the second piece of name (fname),
> remove the middle initial by grabbing
> first name
> remove any residual spaces
> --->
> <cfset fname = listToArray(the_name[2]," ")>
> <cfset fname = replace(fname[1]," ","","all")>
> <!--- get their id and if there are two,
> grab just the top one *not a great query, might return >1* --->
> <CFQUERY NAME="people" DATASOURCE="dpch"
> maxrows="1">
> select fname,lname,id
> from PEOPLE
> where UPPER(fname) = UPPER('#fname#')
> AND UPPER(lname) = UPPER('#lname#')
> order by id
> </CFQUERY>
> <cfif people.recordCount EQ 0>
> <cfset arrayAppend(error_ar,"Missing
> Person: #fname#,#lname#")>
> <cfelse>
> ,<cfqueryparam value="#people.id#"
> cfsqltype="CF_SQL_NUMERIC">
> </cfif>
> <!--- <cfoutput><p>#people.id#</p></cfoutput>
> <cfabort> --->
> </cfif>
> <cfif gg EQ 7>
> <!--- replace . and $ and , with nothing.
> didn't use replacelist cause I was replacing a comma and it's comma
> delimited --->
> <cfset tmp_ar[gg] =
> 
> replace(replace(replace(tmp_ar[gg],".","","all"),"$","","all"),",","","all")>
> ,<cfqueryparam value="#tmp_ar[gg]#"
> cfsqltype="CF_SQL_NUMERIC">
> </cfif>
> </cfcase>
> <cfcase value="8,9" delimiters=",">
> <!--- build out dates --->
> <cfset the_date = listToArray(tmp_ar[gg],"/")>
> <cfset the_date =
> createDate(the_date[3],the_date[1],the_date[2])>
> ,<cfqueryparam value="#the_date#"
> cfsqltype="CF_SQL_DATE">
> </cfcase>
> <cfdefaultcase>
> ,<cfqueryparam value="#tmp_ar[gg]#"
> cfsqltype="cf_sql_varchar">
> </cfdefaultcase>
> </cfswitch>
> </cfloop>
> ,<cfqueryparam value="" cfsqltype="cf_sql_varchar">,
> <cfqueryparam value=""
> cfsqltype="cf_sql_varchar">,<cfqueryparam value="current"
> cfsqltype="cf_sql_varchar">
> )
> </CFQUERY>
> --
> Daniel Kessler
> 
> Department of Public and Community Health
> University of Maryland
> Suite 2387 Valley Drive
> College Park, MD 20742-2611
> 301-405-2545 Phone
> www.phi.umd.edu <http://www.phi.umd.edu>
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218423
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to