Subject: The mailing list for listmasters using Sympa
List archive
- From: "Keith A. Marrocco" <address@concealed>
- To: address@concealed
- Subject: Multi-line sql_query in list config file
- Date: Thu, 25 Sep 2003 12:44:06 -0500
I apologize if I have overlooked this in any documentation source.
Is it possible to construct a sql-query using multiple lines instead on all on one line? That is, instead of something like
sql_query select distinct l.ldap_uid || '@neo.tamu.edu' "EMAIL" from NAMESERV.SIMS_DIRECTORY s, NAMESERV.LDAP l where s.student_id = l.ssn and l.TAMU_FORWARDING_ADDRESS is null and l.NEO_FORWARDING_ADDRESS is null and s.semester in (select semester from nameserv.current_semester) union select distinct l.TAMU_FORWARDING_ADDRESS "EMAIL" from NAMESERV.SIMS_DIRECTORY s, NAMESERV.LDAP l where s.student_id = l.ssn and l.TAMU_FORWARDING_ADDRESS is not null and s.semester in (select semester from nameserv.current_semester) union select distinct l.NEO_FORWARDING_ADDRESS "EMAIL" from NAMESERV.SIMS_DIRECTORY s, NAMESERV.LDAP l where s.student_id = l.ssn and l.NEO_FORWARDING_ADDRESS is not null and s.semester in (select
semester from nameserv.current_semester)
I would like to do something more readable (pretty-printish), understandable, and changeable, similar to
sql_query
select distinct
l.ldap_uid || '@neo.tamu.edu' "EMAIL"
from NAMESERV.SIMS_DIRECTORY s,
NAMESERV.LDAP l
where s.student_id = l.ssn and
l.TAMU_FORWARDING_ADDRESS is null and
l.NEO_FORWARDING_ADDRESS is null and
s.semester in (select semester from nameserv.current_semester)
union
select distinct
l.TAMU_FORWARDING_ADDRESS "EMAIL"
from NAMESERV.SIMS_DIRECTORY s,
NAMESERV.LDAP l
where s.student_id = l.ssn and
l.TAMU_FORWARDING_ADDRESS is not null and
s.semester in (select semester from nameserv.current_semester)
union
select distinct
l.NEO_FORWARDING_ADDRESS "EMAIL"
from NAMESERV.SIMS_DIRECTORY s,
NAMESERV.LDAP l
where s.student_id = l.ssn and
l.NEO_FORWARDING_ADDRESS is not null and
s.semester in (select semester from nameserv.current_semester)
Thanks,
Keith
---
Keith A. Marrocco - Lead Software Applications Developer
Computing and Information Services Texas A&M University
(979) 845-1037 - http://lt.tamu.edu/~keith/
Co-Advisor - Society of Mexican American Engineers and Scientists
-
Multi-line sql_query in list config file,
Keith A. Marrocco, 09/25/2003
- Re: [sympa-users] Multi-line sql_query in list config file, Olivier Salaun - CRU, 09/26/2003
Archive powered by MHonArc 2.6.19+.