Here is the code
<cffile
action="read"
file="#serverFileName#" addnewline="yes"
variable="fileOutput">
<cfset qTmp = QueryNew("ref,asset,serial,manufact,model")>
<cfset fileOutput = Replace(fileOutput,",,",", ,","All")>
<cfset fileOutputNew = Replace(fileOutput,",,",", ,","All")>
<cfloop list="#fileOutput#" index="fileLine" delimiters="#Chr(13)#">
<cfset tmp = QueryAddRow(qTmp,1)>
<cfscript>
QuerySetCell(qTmp,"ref", Replace(listGetAt(fileLine,1),"""","","All"));
QuerySetCell(qTmp,"asset", Replace(listGetAt(fileLine,2),"""","","All"));
QuerySetCell(qTmp,"serial", Replace(listGetAt(fileLine,3),"""","","All"));
QuerySetCell(qTmp,"manufact", Replace(listGetAt(fileLine,4),"""","","All"));
QuerySetCell(qTmp,"model", Replace(listGetAt(fileLine,5),"""","","All"));
</cfscript>
<cfquery name="getQuery" dbtype="query">
SELECT *
FROM qTmp
</cfquery>
</cfloop>
Hope this helps
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:197660
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54