rajprakashraj Posted March 17, 2016 Report Share Posted March 17, 2016 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: Link to comment Share on other sites More sharing options...
MunnaRockz Posted March 17, 2016 Report Share Posted March 17, 2016 Ltt Link to comment Share on other sites More sharing options...
andhravodu Posted March 17, 2016 Report Share Posted March 17, 2016 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 Link to comment Share on other sites More sharing options...
rajivn786 Posted March 17, 2016 Report Share Posted March 17, 2016 Use UTL_FILE Link to comment Share on other sites More sharing options...
mulakaya_123456 Posted March 17, 2016 Report Share Posted March 17, 2016 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. Link to comment Share on other sites More sharing options...
andhravodu Posted March 18, 2016 Report Share Posted March 18, 2016 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? Link to comment Share on other sites More sharing options...
mulakaya_123456 Posted March 19, 2016 Report Share Posted March 19, 2016 spool undaga, stored proc, utl_file enduku man? Exception handling kosam Link to comment Share on other sites More sharing options...
andhravodu Posted March 19, 2016 Report Share Posted March 19, 2016 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 Link to comment Share on other sites More sharing options...
mulakaya_123456 Posted March 19, 2016 Report Share Posted March 19, 2016 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. Link to comment Share on other sites More sharing options...
loveindia Posted March 19, 2016 Report Share Posted March 19, 2016 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.. Link to comment Share on other sites More sharing options...
mulakaya_123456 Posted March 20, 2016 Report Share Posted March 20, 2016 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 Link to comment Share on other sites More sharing options...
ceelogreen Posted March 20, 2016 Report Share Posted March 20, 2016 ssis or ssrs Link to comment Share on other sites More sharing options...
loveindia Posted March 20, 2016 Report Share Posted March 20, 2016 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... Link to comment Share on other sites More sharing options...
Recommended Posts