rss
Search : in
By : Relevance Date Username
Statut : Not resolved

How to write a sql query in a shell

lnz.linz, on Sunday May 4, 2008 11:24:07 AM
Hello,


I want to write a query in shell that retrieves the users from a user table in oracle and then send an email to the user list output. How can i do that in shell script. any idea? Thanks !
Configuration: Windows XP
Internet Explorer 6.0
Reply to lnz.linz  Report this message to moderators Go to last message

1


  • This message seems useful, vote!
  • Report this message to moderators
 johnnyind, on Sunday May 4, 2008 01:04:35 PM
Hai



The following just worked for me:
addresslist=$(sqlplus -s scott/tiger << !
set pagesize 0
set feedback off
select email_address
from my_table
where email_address is not null
/
exit
!)

sendmail $addresslist < my.msg
Reply to johnnyind
Relevant topic found in the forum
14/06 14h44Dvd writer0
25/05 14h33Sqlite database always locked1
22/05 12h29Writting a batch file0
04/05 12h27Writing specific lines to new file1
More discussions about « How to write a sql query in a shell »
Software found in the relevant downloads
Download Avast! 4 Familial 4.8Avast! 4 Familial - avast! 4 Home Edition is a complete and free antivirus solution, fully able to find computer viruses, to create and check...Category: Antivirus
License: Freeware/gratuit
Download Java Runtime Environment 6 Update 7Java Runtime Environment - Java allows you to play online games, chat with people around the world, calculate your mortgage interest, and view images...Category: Java
License: Freeware/gratuit
Download OpenOffice 2.4.1OpenOffice - OpenOffice is a free office application suite, including a word processor, spreadsheet, presentation tool, drawing package...Category: Office suite
License: Open Source
Download PortableApps Suite 1.1PortableApps Suite - PortableApps.com Suite is a complete collection of portable apps including a web browser, email client, office suite,...Category: Office software
License: Open Source
More freeware about « How to write a sql query in a shell »