Subject Re: [ib-support] SQL Question
Author Helen Borrie
At 07:18 AM 25/02/2003 +0000, you wrote:
>I have a table with a 3 fields in.
>These are LType, Sale og DB.
>LType is either 0 or 1.
>I would like to make a select that returns this at each line:
>Sale (where LType=0), DB (Where LType=0), Sale (Where LType=1) and DB
>Can I do this ?
>MAybe with a view ?
>My customer would like to have these numbers on the same line to make
>some compares.

If you can link one of the output columns (Sale or DB) with a matching
value on different records, you could do a re-entrant join; if you could
link both, you could do a correlated sub-select. Otherwise, on what basis
would you be able to link these pairs to form a single row?