Thanks, but it is not that simple.
I have plenty of things to check, convert, validate, etc.
Don't forget an Excel file is created and filled by humans ;-)
I would figure out a way to use my RDBMS to handle this. Navicat or SQL Server
tools to do it.
Then clean the data or whatever once it's
I agree using something like Navicat to load the data would be a much better
solution, but if you must use code, then I would parse those table names and
replace all of the bad characters and spaces before creating the tables.
Special characters and spaces just cause too many problems to even
Another way to do this is read the file, loop thru the lines and massage the
data as wanted when inserting into the database. This way you can have better
control on the data manipulation.
cfloop file=#expandPath('.')#\sampledata.csv from=1 index=line
cfquery name=qi datasource=#mydsn#
On Thu, Oct 21, 2010 at 1:03 PM, Ketan Jetty kje...@yahoo.com wrote:
Another way to do this is read the file, loop thru the lines and massage
the data as wanted when inserting into the database. This way you can have
better control on the data manipulation.
cfloop
If this is MS SQL you can do this as well.
Thanks, but it is not that simple.
I have plenty of things to check, convert, validate, etc.
Don't forget an Excel file is created and filled by humans ;-)
~|
Order the Adobe
Hi,
I have to create a new database from a CSV text file.
I have an ODBC datasource defined for the CSV file and I can read the file with
a query like:
CFQUERY NAME=getMembers DATASOURCE=Import
SELECT * FROM membersImport.csv
/CFQUERY
The problem is that column names have blanks and special
I've tried getMembers['Région administrative'] but it
causes an error.
Did you forget the row number or is that typo?
ie
queryName[column name][ rowNumber ]
~|
Order the Adobe Coldfusion Anthology now!
Did you forget the row number or is that typo?
Actually, I'm in a loop on the query, I thought the row number would be
implicit as usual.
But you're right, queryName[column name][queryName.currentRow] does work.
This is kind of weird since queryName.columnName works, bur not
This is kind of weird since queryName.columnName works, bur
not queryName[columnName]
I guess the difference is queryName[columnName] gives you access to the
column array. I thought it was strange at first too. But realized it is a good
thing, since it allows you to access values in any row
9 matches
Mail list logo