I have the following tables to be downloaded in CFMX.  The actual
table names are:

Demo
FuncAbility
GatekeeperVisit
HealthStatus
HospitalVisit
Institutation
Insurance
Intake
PhoneTrack
PsychSocialCognitive
Services


What I am trying to do:

?? question ==> need to do cfloop for all tables above mentioned:

<CFQUERY NAME="ExportData" DATASOURCE="Gkeeper">
SELECT *
FROM tablename
</CFQUERY>

<CFSET tempfile = "C:\temp\exptemp.csv">
<CFSET output = "">

?? question ==> there are many filed (column) names, so I like to do
cfloop so that I don't need to hard-code all fields.

<CFSET output = output & "field1     field2     field3">

<CFFILE ACTION="WRITE"
     FILE="#tempfile#"
     OUTPUT="#output#">

<CFLOOP QUERY="GetList">
     <CFSET output = "">
      ?? question ==>  I like to do cfloop so that I don't need to
hard-code all fields.
     <CFSET output = output & "#field1#     #field2#     #field3#>
     <CFFILE ACTION="APPEND"
          FILE="#tempfile#"
          OUTPUT="#output#">
</CFLOOP>
<CFCONTENT TYPE="application/excel" FILE="#tempfile#">

and then
<CFMAIL>
?? question: e-mail new .XLS files
</CFMAIL>

?? question: remove all .XLS files so that always new .XLS files can
be downloaded and e-mailed.

Please advice.

thx much

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297389
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to