One can use Pipes or Tabs instead of commas. _____
From: [email protected] [mailto:[email protected]] On Behalf Of Daniel Klein Sent: Tuesday, June 17, 2014 4:02 AM To: [email protected] Subject: Re: Export tables to CSV using jshell This of course assumes that there are no 'commas' in any of the 'FIELD's. If you are familiar with BASIC then do something like this pseudo code, which encloses each comma-delimited field in double-quotes: OPEN my_table TO mytablefile OPENSEQ 'path_to_csv_file' TO csvfile EQU dq TO CHAR(34) ;* double-quote character EQU comma TO CHAR(44) SELECT my_table LOOP READNEXT id READ record FROM mytablefile,id THEN csv = dq:CHANGE(record,@AM,dq:comma,dq):dq WRITESEQ csv ON csvfile END REPEAT This of course assumes that there are no double-quotes in the data ;-) Dan On Tue, Jun 17, 2014 at 3:01 AM, Vladimir Kazimirchik <[email protected]> wrote: Hi, the quick-and-dirty way: (in jsh prompt; replace my_table to table name, FIELD1 etc to names of necessary fields) SELECT my_table SAVING EVAL "FIELD1:',':FIELD2:',':FIELD3" >SAVE.LIST out_file.csv to automate things you can create a paragraph. Cheers VK On Tuesday, June 17, 2014 1:23:18 AM UTC+5, Divine selasi wrote: Hello all, Please I want to export tables in my Jbase database to CSV on my desktop. But i am having a challenge. Please anyone with any code that will help me achieve me aim. Thanks for your help. Best regards, Divine -- -- IMPORTANT: T24/Globus posts are no longer accepted on this forum. To post, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en --- You received this message because you are subscribed to the Google Groups "jBASE" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- -- IMPORTANT: T24/Globus posts are no longer accepted on this forum. To post, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en --- You received this message because you are subscribed to the Google Groups "jBASE" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- -- IMPORTANT: T24/Globus posts are no longer accepted on this forum. To post, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en --- You received this message because you are subscribed to the Google Groups "jBASE" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
