Re: [SQL] LEFT JOIN on one and/or another column (thanks)

2004-01-29 Thread Octavio Alvarez
Yes, Bruno. Thank you very much. That's what I was looking for, but since I hadn't used CASE nor COALESCE, I didn't know it was easier that way. The idea is that on a column I have info about a routine task, and in another one I have info about human-made changes to the time of that task, like as

Re: [SQL] LEFT JOIN on one and/or another column

2004-01-29 Thread Bruno Wolff III
On Wed, Jan 28, 2004 at 20:27:00 -0800, Octavio Alvarez <[EMAIL PROTECTED]> wrote: > > Hi. I have a table with two foreign keys (1 field each), like in > > id| serial > ext_key_original | integer > ext_key_exception | integer > > They mean different things, as one refers to

[SQL] LEFT JOIN on one and/or another column

2004-01-28 Thread Octavio Alvarez
Hi. I have a table with two foreign keys (1 field each), like in id| serial ext_key_original | integer ext_key_exception | integer They mean different things, as one refers to a typical value, and the other one refers to an exception that applies for that tuple. Each key ref