
February 17th, 2012, 05:58 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Poland
Posts: 11
Time spent in forums: 7 h 57 m 35 sec
Reputation Power: 0
|
|
|
Left Join two dependent tables
Hi, I have some problem with joining two dependent tables... I need to do this:
Code:
SELECT
t1.Id_t1
coalesce(t3.Data,'No data') AS Data
FROM t1
LEFT JOIN t2 ON t2.Id_t2 = t1.Id_t1
LEFT JOIN t3 ON t3.Id_t3 = t2.Id_t2
I have an error "numeric overflow" when there is no t2 table record... so in that case how to Select 'No data' from t3 where there is no t2 record? I mean 't3.Id_t3 = t2.Id_t2' shouldn't be taken when there is no t2 record... how to do this?
Thanks for any help! 
|