csv - sqlplus export vis cmd -


i'm trying export data csv sql plus via cmd line keep getting error:

sp2-0042 unknown command "  s" - rest of line ignored.  

i'm running

sqlplus user/pass@server @exportdata.sql 

and script looks this

    set underline off     set colsep ,     set lines 1000 pages 1000     set feedback off     set heading on     spool c:\networkthresholdtriggers\arl1_1x.csv     select t1.bsm_nm, t1.d_dtm datetime, sum(v_att_cnt) v_att_cnt, sum(v_drp_call_cnt) v_drp_call_cnt     (select bsm_nm, max(d_dtm) maxdatetime     ds3r_fh_1xrtt_bts_lvl_kpi     group bsm_nm) t2     inner join ds3r_fh_1xrtt_bts_lvl_kpi t1      on     t1.bsm_nm = t2.bsm_nm                     ,  t1.d_dtm = t2.maxdatetime     , t1.bsm_nm = 'arl1'     group      t1.bsm_nm, t1.d_dtm     having     case when sum(v_att_cnt) = 0 0 else sum(v_drp_call_cnt)/sum(v_att_cnt) end >= .01;     spool off 

whats weird if login sqlplus this

sqlplus user/pass@server 

and paste in code, works. why doesn't work .sql file?

figured out, had save ansi file , not unicode


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -