SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Saving database field name to file

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Saving database field name to file
Author Message
klwong



Joined: 07 Mar 2009
Posts: 22
Country: Australia

Post Saving database field name to file Reply with quote
I am using the following command

DatabaseRetrieve
DatabaseSave

I got the results I wanted except I also like to include the field name of my results. Is there a command to do this ? If not, what is the most efficient way to do this ? Appreciate any assistance.
Thu Jul 02, 2009 6:58 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
You would need to add them to the result as a the first row or concatenate after saving
DatabaseRetrieve "SELECT 'col1', 'col2', 'col3' UNION SELECT col1, col2, col3 FROM my_table", ...

Or save a static text file with column headers as you want to see them in the resulting file and then after DatabaseSave, execute
RunAndWait( "cmd /C copy headers.txt /A + saved_data.txt /A saved_data.txt", "target folder", 0, pid )
Thu Jul 02, 2009 8:22 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.