Sample Header Ad - 728x90

Generating .XLS file as an output file of sqlplus query and sending that .XLS file as an attachment in email

-1 votes
1 answer
1882 views
I am generating output file (.xls format) from the below DB query- sqlplus -S -L user/pass@DB > home/test/query_output.xls set line 22000 set head off set feedback off SELECT * from table; EOF The query_output.xls file contains records as below- VIM 00 34562356 22412299 Dated 11-JUN-18 OMM sansra carla Yes No No No 02356478 14-SEP-18 To send this query_output.xls file as an attachment in email, I am using below- uuencode home/test/ query_output.xls | mailx -s "Subject" me@Domain.com Also tried uuencode query_output.xls query_output.xls | mailx -s "Subject" me@Domain.com But not getting the data in attachment received in email. Also tried mailx -a and mutt but its showing 'illegal option -- a' and 'command not found' resp. mailx -a home/test/query_output.xls -s "Subject" me@Domain.com < /dev/null mutt -a query_output.xls query_output.xls < /dev/null also tried mailx -s "Subject" me@Domain.com < query_output.xls but no attachment received. Could you please help?
Asked by Praveen Verma (123 rep)
Jun 13, 2018, 10:26 PM
Last activity: Aug 21, 2023, 07:05 PM