rajprakashraj Posted March 17, 2016 Report 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:
andhravodu Posted March 17, 2016 Report 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
mulakaya_123456 Posted March 17, 2016 Report 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.
andhravodu Posted March 18, 2016 Report 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?
mulakaya_123456 Posted March 19, 2016 Report Posted March 19, 2016 spool undaga, stored proc, utl_file enduku man? Exception handling kosam
andhravodu Posted March 19, 2016 Report 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
mulakaya_123456 Posted March 19, 2016 Report 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.
loveindia Posted March 19, 2016 Report 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..
mulakaya_123456 Posted March 20, 2016 Report 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
loveindia Posted March 20, 2016 Report 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...
Recommended Posts