Hello All, Please i have corrected the earlier error i sent to you all. But please the output file, i saved it using my desktop path to be able to save to my desktop but i didnt see it although the command executed successfully. I tried without the path, i entered only the name of the file and i searched it on my machine but still didnt see the file.
Please any help? *BELOW IS THE CODE I USED.* OPTION 1 jsh meta ~ -->SELECT FBNK.STMT.ENTRY SAVING EVAL "STMT.ENTRY.ID: ',':COMPANY.CODE" 10768 Records selected >SAVE.LIST out_file.csv 10768 record(s) saved to list 'out_file.csv' OPTION 2 jsh meta ~ -->SELECT FBNK.STMT.ENTRY SAVING EVAL "STMT.ENTRY.ID: ',':COMPANY.CODE" 10768 Records selected >SAVE.LIST C:\Users\RTX-JOSEPH\Desktop\text.csv 10768 record(s) saved to list 'C:\Users\RTX-JOSEPH\Desktop\text.csv' Thanks. On Tue, Jun 17, 2014 at 9:05 AM, Saralinda Christopher-Evans < [email protected]> wrote: > 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. > -- -- 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.
