Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

SQL Programming ?

sql

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1 william7

william7

    CC Lurker

  • New Member
  • Pip
  • 6 posts

Posted 21 February 2015 - 12:11 PM

Can anyone give me some helpful advice in regards to this SQL programming problem in the screenshot below? I tried this and a UNION operator to no avail. I'm suppose to list the order number and order date for each order that either was placed by Johnson's Department Store or that contains an orderline for a Gas Range. There are orders for a Gas Range and Johnson's Department Store has made orders so there is data to this effect.

 

Y5IF8LH.jpg

 

KfiwrnF.jpg

 

iFRnnZU.jpg



#2 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 21 February 2015 - 12:35 PM

Your query is running perfectly, the problem is that there are no matches.

 

Check the tables. There is no order_num which contains both  '608' and 'DR93'.

 

If in your query you change 'DR93. for 'BV06' you'll have one match.

 

Also I recommend you toread about joins.






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download