Query approach [message #339293] |
Thu, 07 August 2008 04:10 |
Olivia
Messages: 519 Registered: June 2008
|
Senior Member |
|
|
Want to know which one is feasible from optimization perspective?
select b.trace_loc_cd trace_loc_cd, b.prod_cd, b.dest_location_cd
from item a, order b
where a.type_id = in_type_id
and a.product_req_item_id = b.order_item_id
order by b.t_loc_cd
select b.trace_loc_cd trace_loc_cd , b.prod_cd, b.dest_location_cd
from order b where
(in_case_id,b.order_item_cd) in ( select a.type_id,a.product_req_item_cd from item a)
order by b.trace_loc_cd
Thanks in adavnce,
Regards,
Oli
[Updated on: Thu, 07 August 2008 04:24] Report message to a moderator
|
|
|
Re: Query approach [message #339305 is a reply to message #339293] |
Thu, 07 August 2008 04:41 |
Olivia
Messages: 519 Registered: June 2008
|
Senior Member |
|
|
Want to know which one is feasible from optimization perspective?
Which approach woul be feasible?
Need your help!
Regards,
Oli
|
|
|
Re: Query approach [message #339308 is a reply to message #339305] |
Thu, 07 August 2008 04:44 |
|
Michel Cadot
Messages: 68711 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
What do you mean "feasible"?
From my synonym dictionary: feasible is achievable, attainable, conceivable, doable, imaginable, likely, possible, practicable, practical, thinkable, viable, workable. Which one for you?
Regards
Michel
|
|
|
Re: Query approach [message #339310 is a reply to message #339308] |
Thu, 07 August 2008 04:46 |
Olivia
Messages: 519 Registered: June 2008
|
Senior Member |
|
|
Michel Cadot wrote on Thu, 07 August 2008 04:44 | What do you mean "feasible"?
From my synonym dictionary: feasible is achievable, attainable, conceivable, doable, imaginable, likely, possible, practicable, practical, thinkable, viable, workable. Which one for you?
Regards
Michel
|
Best approach...
|
|
|
|
Re: Query approach [message #339338 is a reply to message #339337] |
Thu, 07 August 2008 05:33 |
Olivia
Messages: 519 Registered: June 2008
|
Senior Member |
|
|
Quote: |
For myself, I tend to use the second form when I don't need the values from the second table in the select list.
|
I got the answer
Thanks,
Oli
|
|
|