M make Member Jun 6, 2002 #1 Hi, i have build a temp tabel with some fields. No i want to make an output to a csv file. Can anybody give me a tip, maby with short example ? greets Make
Hi, i have build a temp tabel with some fields. No i want to make an output to a csv file. Can anybody give me a tip, maby with short example ? greets Make
C Crittar Member Jun 6, 2002 #2 Make sure that none of the fields on your temp-table have a format which would include commas. Then simply: OUTPUT TO /somewhere/somefile.csv. FOR EACH temp-table NO-LOCK: EXPORT DELIMITER ',' temp-table. END. /* End for each */ OUTPUT CLOSE. Simply replace "/somewhere/somefile.csv" with the path and name of the file you want; replace "temp-table" with the name of your temp-table. Hope this helps. :awink:
Make sure that none of the fields on your temp-table have a format which would include commas. Then simply: OUTPUT TO /somewhere/somefile.csv. FOR EACH temp-table NO-LOCK: EXPORT DELIMITER ',' temp-table. END. /* End for each */ OUTPUT CLOSE. Simply replace "/somewhere/somefile.csv" with the path and name of the file you want; replace "temp-table" with the name of your temp-table. Hope this helps. :awink: