Subject: The mailing list for listmasters using Sympa
List archive
- From: Jérôme Zittoun <address@concealed>
- To: "'Mark Sallee'" <address@concealed>
- Cc: <address@concealed>
- Subject: RE: [sympa-users] multiple sql queries to Oracle
- Date: Fri, 14 Mar 2008 09:23:11 +0100
Hi Mark,
You should create an "UNION" query with these 3 statements, like :
"select ID from...
union
select distinct email from...
union
select distinct email from..."
The best should be a view inside Oracle with parameters.
Be careful, the only field this complex query has to return is an email.
Hope this help,
Jérôme
--
Jérôme Zittoun
Erigne Informatique / DZ2
http://www.erigne.com
> -----Message d'origine-----
> De : Mark Sallee [mailto:address@concealed]
> Envoyé : vendredi 14 mars 2008 00:03
> À : address@concealed
> Objet : [sympa-users] multiple sql queries to Oracle
>
> Is there a way to run multiple sql queries from an Oracle database
> within sympa? In our existing mailing list system, we have to
> use a perl
> script with variables to bring in subscriber e-mails.
> Something like this:
>
> my $GT = "SELECT ID FROM School WHERE Code= '$StateCode' AND
> LifeCycle='A';"
> my $CC = "select distinct email from country_contacts where
> email is not
> null and contactcode = 'CC'
> my $USP = "select distinct email from franchise_contact, g_franchise
> where g_franchise.franchiseid = franchise_contact.franchiseid
>
> Then we would set the output: All_Admin subscribers= $GT +
> <some more
> sql parameters> + $CC + $USP
>
> Is this possible in sympa? Could we add multiple queries to
> the config
> file for a list?
>
> Thank you.
>
> --
> Mark Sallee, Systems Administrator
> The GLOBE Program - UCAR
> address@concealed
>
>
>
-
[sympa-users] multiple sql queries to Oracle,
Mark Sallee, 03/13/2008
- RE: [sympa-users] multiple sql queries to Oracle, Jérôme Zittoun, 03/14/2008
Archive powered by MHonArc 2.6.19+.