Thanks, everyone.  I just re-write the statement without the use of subquery.  
The statement is actually a lot simpler than with the subquery.

(SELECT USERID, HOMEADDR AS ADDRESS FROM QURYUSERS WHERE NOT HOMEADDR IS NULL)
UNION
(SELECT USERID, BUSADDR AS ADDRESS FROM QURYUSERS WHERE HOMEADDR IS NULL AND 
NOT BUSADDR IS NULL)

Johnny

>They don't support subqueries. They're really very limited in terms of
>supporting SQL syntax. I don't think they were really ever intended
>for anything more than relatively simple operations like, joining 2
>queries from different servers (an oracle erp system + a local sql
>server database) or fetching aggregate values from an existing query.
>I use them occasionally to resort or refilter a query. I've got one
>bit of code that uses an XSL transformation to get the id values for
>all the records I want to isolate and return in a particular query,
>but the actual QoQ is very simple, it's just "select * from query
>where keycolumn in (#XslTransformedListOfIDs#)"
>
>> I don't see anything about support for subqueries, I would
>> be surprised if they were supported. Even if they were, I
>> would seriously re-think using a QofQ instead of operating
>> against the database. If you read the notes on QofQ,
>> you'll see that performance really lags on complex
>> operations.
>
>
>
>s. isaac dealey     434.293.6201
>new epoch : isn't it time for a change?
>
>add features without fixtures with
>the onTap open source framework
>
>http://www.fusiontap.com
>http://coldfusion.sys-con.com/author/4806Dealey.htm

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235254
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to