If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Question Regarding Join and conditional clause

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-18-11, 17:46
forumdata forumdata is offline
Registered User
 
Join Date: Apr 2011
Posts: 1
Question Regarding Join and conditional clause

Hello,
I have two tables, for example

Table A
Column 1(primary key)
Column 2
Column 3


Table B
Column 4 (primary key)
Column 5 (foreign key based on Column 1 of Table A)
Column 6
Column 7

I only want rows from Table B that do not correspond to rows in Table A but with an exception. I would like to include rows from Table B that have corresponding rows in Table A if Column 7 is populated with a value other than "failed". I would appreciate if someone can help me with this problem. I tried using left outer join but could not get the results. Thanks.
Reply With Quote
  #2 (permalink)  
Old 04-19-11, 04:47
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Is this the whole coursework or was there any extra information?
When does the work need to be done by?
__________________
Mike
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On