How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask ehabtutor Your Own Question
ehabtutor
ehabtutor, Computer Software Engineer
Category: Programming
Satisfied Customers: 1344
Experience:  Bachelor of computer science, 5+ years experience in software development, software company owner
13535664
Type Your Programming Question Here...
ehabtutor is online now

cxd

This answer was rated:

cxd

ehabtutor :

Hi againCustomer/p>

ehabtutor :

can you further explain what is needed

Customer:

Hi using the table I've already provided you could you an SQL query that would list the Part_ID, purchase_price and Part_name for all parts that have never been ordered. and also explain the problem with INNER JOIN for finding data from rows that do not participate in a relationship.

if possible as well to also check an sql statement that i have done that would list the Part_ID, purchase_price and Part_name for all parts that have been ordered to see if it is correct



ehabtutor :

ok give me the sql you already wrote

Customer:



Select Part, Purchase_price, Part_name FROM Part where part in(Select Part from


Order_line)

ehabtutor :

ok give me a couple of minutes and i will reply back

Customer:

thanks

HiCustomer

First of all as for your query : Select Part, Purchase_price, Part_name FROM Part where part in(Select Part from
Order_line)

its perfectly ok.

As for the second query:
Select Part, Purchase_price, Part_name FROM Part where part not in(Select Part from
Order_line)

I cannot get what you mean by the inner join issue. can you give me an example to elaborate on what you mean.

regards,
ehab tutor
ehabtutor and 2 other Programming Specialists are ready to help you
Customer: replied 4 years ago.

is it possible to go back in the live chat as i cant post my message

unfortunatley not. i wasn't able to load the chat.
It seems so buggy this days.

you can use the Q & A mode here.

post your message here and i will reply to you

regards,
ehab tutor
Customer: replied 4 years ago.

here is a link to a text file as i cannot post on here http://www.mediafire.com/?4joa30cz02gae14

I already got this in the chat above.

I don't understand what you mean by this. I need you to elaborate on this or give me an example so i can understand what you mean

regards,
ehab tutor
Do you mean by this that you are using inner join to join 2 tables and you want to retrieve a row from a third table that is not in the join?

regards,
ehab tutor
Customer: replied 4 years ago.

yes

You are trying to get data in the same query that are not related to each other through a join condition. This is doable by using a subselect but it is limited to one column . but this is not a recommended approach

I hope i was able to answer your inquiry.

regards,
ehab tutor
Customer: replied 4 years ago.

kind of thanks

You are welcome anytime.

don't forget to take a minute to leave me positive rating.

A bonus will be highly appreciated.

regards,
ehab tutor