Question
Import a comma text file with CF 5
I have a comma delimted text file with a bunch of records....
each field enclosed in quotes like :
"stuff","stuff","stuff"
"stuff","stuff","stuff"
"stuff","stuff","stuff"
"stuff","stuff","stuff"
etc...
- I'm using cffile action= READ xxxxxx variable="getstuff" - to get the data
- now i want to loop thru and import all the records into the proper fields into a pre existing table...
Q: what the easiest way to loop thru and import these records?
I'm trying things like :
cfloop index="this"
list="#get#"
delimiters="#chr(13)##chr(10)#"
field 1 = ListGetAt(this, 1)
field 2 = ListGetAt(this, 2)
etc..
but maybe there's a better way?
"stuff","stuff","stuff"
"stuff","stuff","stuff"
"stuff","stuff","stuff"
"stuff","stuff","stuff"
etc...
- I'm using cffile action= READ xxxxxx variable="getstuff" - to get the data
- now i want to loop thru and import all the records into the proper fields into a pre existing table...
Q: what the easiest way to loop thru and import these records?
I'm trying things like :
cfloop index="this"
list="#get#"
delimiters="#chr(13)##chr(10)#"
field 1 = ListGetAt(this, 1)
field 2 = ListGetAt(this, 2)
etc..
but maybe there's a better way?