I've got a table called 'main' described as follow
CREATE TABLE main (
id_other_table INT,
value CHAR
);
and a table called 'other' described as follow
CREATE TABLE other (
id INT PRIMARY KEY,
value CHAR
);
I want to write a query on table 'main' that if 'id_other_table' is null
returns value from itself, from table 'other' otherwise.
Thank you very much, have a wonderful day!
Marco
--
Marco Lazzeri [ n o z e S.r.l. ]
Via Giuntini, 25/29 - 56023 Navacchio - Cascina (PI)
Tel +39 (0)50 754380 - Fax +39 (0)50 754381
mailto:marco(dot)lazzeri(at)noze(dot)it - http://www.noze.it