[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Technical clarification in using UNION with If condition
- Subject: Re: Technical clarification in using UNION with If condition
- From: ANDERSD2 <ANDERSD2@OAKWOOD.ORG>
- Date: Thu, 15 Mar 2001 07:54:51 -0500
First thing I would do is break it into multiple procedures. Looks like you
are trying to get data from CONFN, CONFN_PROFL, and DEMO where exists in the
other tables. So, build the first procedure to pull the info from CONFN,
CONFN_PROFL, and DEMO. Use this information as criteria in each of your
next two selects (one against the FUNC tables and one against the HOTEL
tables). Use flags to indicate whether each procedure returned a row. This
may not be the most elegant SQL way of doing it as I am not joining all
tables in one huge SELECT statement, but it will be much easier to debug and
it may run quicker.
Hope this was helpful,
D