j2911
asked on
SQL help
Hi experts,
I have one table called results:
results.xls
I have another table and it is called ship_info_xml:
ship-info-xml.xls
I’m writing the following sql statement:
select
results.test_id, results.LEFT_DESCR_VALUE_D ESC, results.RIGHT_DESCR_VALUE_ DESC, results.COMPR_FLD_NAME, ship_info_xml.scnro_id, ship_info_xml.trkng_nbr, ship_info_xml.A, ship_info_xml.B, ship_info_xml.C
from results join ship_info_xml
on results.LEFT_DESCR_VALUE_D ESC = ship_info_xml.trkng_nbr
order by results.test_id;
I've tried to use several different joins but I am getting these same results which causes me duplicates that I cannot seem to get rid of:
query-results.xls
This is the results I would like to see but I am not sure how to accomplish this:
Results-I-would-like-to-see.xls
I have made this hopefully easy to process but I need to know how to code this so it will work properly for me, so I need your help.
Thank you.
I have one table called results:
results.xls
I have another table and it is called ship_info_xml:
ship-info-xml.xls
I’m writing the following sql statement:
select
results.test_id, results.LEFT_DESCR_VALUE_D
from results join ship_info_xml
on results.LEFT_DESCR_VALUE_D
order by results.test_id;
I've tried to use several different joins but I am getting these same results which causes me duplicates that I cannot seem to get rid of:
query-results.xls
This is the results I would like to see but I am not sure how to accomplish this:
Results-I-would-like-to-see.xls
I have made this hopefully easy to process but I need to know how to code this so it will work properly for me, so I need your help.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
select
results.test_id, results.LEFT_DESCR_VALUE_D
from results join
ship_info_xml
on results.LEFT_DESCR_VALUE_D
group by
results.test_id, results.LEFT_DESCR_VALUE_D
order by results.test_id;