#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2009
    Location
    Poland
    Posts
    11
    Rep 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!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2007
    Posts
    36
    Rep Power
    8
    What type is t3.data?
    If is not character than that is causing the error.

IMN logo majestic logo threadwatch logo seochat tools logo