Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 17th, 2012, 05:58 AM
iwosz iwosz is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2009
Location: Poland
Posts: 11 iwosz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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!

Reply With Quote
  #2  
Old February 20th, 2012, 12:58 AM
costin_mentor costin_mentor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Posts: 31 costin_mentor User rank is Lance Corporal (50 - 100 Reputation Level)costin_mentor User rank is Lance Corporal (50 - 100 Reputation Level)costin_mentor User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 13 h 12 m 34 sec
Reputation Power: 7
What type is t3.data?
If is not character than that is causing the error.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Left Join two dependent tables

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap