Jump to content

Csv Download From Plsql Job


Recommended Posts

Posted

Hello all, naku oka requirement icharu...

 

Select * from table1;

 

ee code ni plsql nightly job run chestaru, need to get the query results in csv file and place it in folder (C:\Users\xyz).

 

 

help fleeze :5_2_108:  :3D_Smiles_38:

Posted

Hello all, naku oka requirement icharu...

 

Select * from table1;

 

ee code ni plsql nightly job run chestaru, need to get the query results in csv file and place it in folder (C:\Users\xyz).

 

 

help fleeze :5_2_108:  :3D_Smiles_38:

 

 

Create a sql script with these lines

 

 

spool c:\users\xyz\sample.csv

 

select * from table1;

 

spool off

 

 

 

that will get you what you want. run this script from command line for testing, check the file.

create a batch script which runs this and call that from nightly job

 

I'm assuming OS is windows. unix/linux aithe, create a shell script and ftp to windows

 

btw, select * from table1 is incorrect, you won't get commas. to get commas  select col1 || ',' || col2 || and so on... from table1

Posted

Oracle apps Ithey
Better write shell script and call sql file
Sql file lo procedure ni call cheyyi
Procedure lo UTL_FILE package use chesuko
And you can sftp output or email to wherever you want.

Posted

Oracle apps Ithey
Better write shell script and call sql file
Sql file lo procedure ni call cheyyi
Procedure lo UTL_FILE package use chesuko
And you can sftp output or email to wherever you want.

 

spool undaga, stored proc, utl_file enduku man?

Posted

spool undaga, stored proc, utl_file enduku man?

Exception handling kosam

Posted

Exception handling kosam

 

straight select ki exception endi uncle comedy

 

aina sql handling istundi veetiki, oserror or unknown sqlerrors vaste, ivi pettochu

 

whenever sqlerror exit failure

 

whenever oserror exit failure

 

 

Posted

straight select ki exception endi uncle comedy

 

aina sql handling istundi veetiki, oserror or unknown sqlerrors vaste, ivi pettochu

 

whenever sqlerror exit failure

 

whenever oserror exit failure

 

Char columns date ki convert chesinappudu

aa column format sarrigga lekapothey error kodutundi

its always advisable to create procedure for a report instead of spool for standard reports.

Posted

Sql plus lo aitey spool use cheyochu man.. sql developer aitey direct option untadi kada to export to csv.. sql server data tools aitey direct import to csv using ssis man.. that's it man..

Posted

Sql plus lo aitey spool use cheyochu man.. sql developer aitey direct option untadi kada to export to csv.. sql server data tools aitey direct import to csv using ssis man.. that's it man..

 

not manual

automate cheyyali anta 

Posted

not manual

automate cheyyali anta 

 

ssis aitey simple for automation kada man... sql developer lo aitey bulkcpy use chesi query ni job la cheyyali anukuntunna... sql plus lo aitey telidu man... 

×
×
  • Create New...