Worked like a charm you rock! :) Thanks! Kelly -----Original Message----- From: Jerry Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 3:16 PM To: CF-Talk Subject: RE: EXCEL Question Spaces in Field names
Sorry. I should have been more clear. I used curRow as a generic variable indicating the row of the query you were on. Since you are using a query loop, there should be a variable called currentRow available to you, that CF increments at each loop. >>> [EMAIL PROTECTED] 12/13/01 02:58PM >>> Ok I tried that but it threw an error let me show you all the code so it may help. You will see for the FLAG field I used your code that threw an error saying it didn't know what CURROW was. before it was throwing an error because of the space. Kelly <CFQUERY datasource="faastatus" name="info"> SELECT * FROM RESULTS </CFQUERY> <CFLOOP query="info"> <CFQUERY datasource="asc"> UPDATE STORAGE SET FLAG = '#info['case status'][curRow]#', LNAME = '#LAST NAME#', FNAME = '#FIRST NAME#', MNAME = '#MIDDLE NAME#', SUFFIX = '#SUFFIX#', CASENUM = '#CASE NUMBER#', <CFIF #CASE STATUS# IS "CL" OR #CASE STATUS# IS "CP"> DATECLOSED = '#STATUS DATE#' <CFELSE> DATESCHEDULED = '#STATUS DATE#' </CFIF> WHERE SON = '#son#' AND SSN = 11223#SSN# </CFQUERY> </CFLOOP> -----Original Message----- From: Jerry Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 3:00 PM To: CF-Talk Subject: Re: EXCEL Question Spaces in Field names Is 'case number' from another query? if so, you could reference it via #queryname['case number'][curRow]# Jerry Johnson Lawyersweekly.com >>> [EMAIL PROTECTED] 12/13/01 02:39PM >>> Ok here is the deal. I have an excel file. I can query through it no problem. I have to take results and update a SQL database. Again no problem. Except some of the field names in the excel file have spaces. We receive this file from another party so we can't remove the spaces from the file. Can we 1. rename the field names in excel and remove the spaces that way? or 2. Somehow convert it during the query so it will work. Example: <CFQUERY> UPDATE TABLE SET CASENUM = '#CASE NUMBER#' WHERE WHATEVER = WHATEVER </CFQUERY> It errors out at NUMBER because of the space. Any suggestions? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists