Re: [SQL] Problem with nested left-joins and coalesce

2011-08-08 Thread Carla
Hi Alex! When you wrote "COALESCE(sub6.value1, 1) as value2", you created a column "value2" that is different of the original column "sub4.value2". Try running "SELECT sub3.key3, sub4.value2, value2 FROM ..." and you'll get the result: key1;key3;value2;value2 1;1;null;1 It happens because the firs

Re: [SQL] Problem with nested left-joins and coalesce

2011-08-08 Thread ai
Hi Carla! Well, maybe I too simplified my production code and now I can't see something very simple, BUT I'm pretty sure that there isn't any original column value2 in sub4 except that I created with COALESCE: Meanwhile, I want to note, that I made a little mistake in presented example: in

Re: [SQL] Problem with nested left-joins and coalesce

2011-08-08 Thread Carla
Sorry, my mistake. =( Now I understood the whole problem. 2011/8/8 ai > Hi Carla! > > ** ** > > Well, maybe I too simplified my production code and now I can't see > something very simple, BUT I'm pretty sure that there isn't any original > column value2 in sub4 except that I created with C