Subject | Re: [firebird-support] what is wrong in this select? |
---|---|
Author | Helen Borrie |
Post date | 2008-02-28T00:11:20Z |
At 10:34 AM 28/02/2008, Fidel Viegas wrote:
However, you are right in your observation that the example query was a pretty idiotic waste of engine effort. Trying to make a daft query work "just because it works in Oracle" seems a futile waste of bandwidth. A daft query is a daft query. The developer might achieve more by concentrating on what his application code is doing, that allows it to generate daft queries from user inputs, regardless of which back-end the queries are going to.
./heLen
>But, generally speaking theErm, not so. UNION is often used - perhaps even *most often* used - to draw a set from a single table. Typically this will be where you want different information from a row depending on some condition that is determined by some control value. For a union the engine doesn't care where the data comes from, as long as the second and subsequent subsets match type-for-type.
>union operator should be used to draw information from two or more
>tables with the same structure.
However, you are right in your observation that the example query was a pretty idiotic waste of engine effort. Trying to make a daft query work "just because it works in Oracle" seems a futile waste of bandwidth. A daft query is a daft query. The developer might achieve more by concentrating on what his application code is doing, that allows it to generate daft queries from user inputs, regardless of which back-end the queries are going to.
./heLen