Advertisement
Advertisement
| 09.05.2008 at 12:57PM PDT, ID: 23707530 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: |
PROCEDURE get_Sales_Grades (cur_out IN OUT t_cursor,
p_price_list_hdr_id IN price_list_dtl.price_list_hdr_id%TYPE,
p_status OUT NOCOPY varchar2)
IS
BEGIN
p_status := 'Success';
OPEN cur_out
FOR
-- EXCEPTION
SELECT B.grade_pool_code, D.pool_part_code, B.grain_class_name, B.grade_protein_pct,
E.strght_code, C.strght_price_amt, E.tough_code, E.damp_code, E.stone_code, E.tough_stone_code, E.damp_stone_code,
D.wht_tough_disc_amt, D.wht_damp_disc_amt, D.wht_stone_disc_amt,
D.durum_tough_disc_amt, D.durum_damp_disc_amt, D.durum_stone_disc_amt,
D.bly_tough_disc_amt, D.bly_damp_disc_amt, D.bly_stone_disc_amt,
D.desigtd_bly_tough_disc_amt, D.desigtd_bly_damp_disc_amt,D.sct_effctv_dtm
FROM price_like_grade A, grade_code_dtl B, price_list_dtl C, price_list_hdr D,
(Select grade_code_dtl_id,
max(CASE code_type_name when 'STRAIGHT' then disc_code else null end) as Strght_Code,
max(CASE code_type_name when 'TOUGH' then disc_code else null end) as Tough_Code,
max(CASE code_type_name when 'DAMP' then disc_code else null end) as Damp_Code,
max(CASE code_type_name when 'STONE' then disc_code else null end) as Stone_Code,
max(CASE code_type_name when 'TOUGH STONE' then disc_code else null end) as Tough_Stone_Code,
max(CASE code_type_name when 'DAMP STONE' then disc_code else null end) as Damp_Stone_Code
from grade_item
group by grade_code_dtl_id) E
WHERE A.price_like_type_name = 'Exception'
AND B.grade_code_dtl_id = A.grade_code_dtl_id --Problem i think is here. Look at the images.
AND C.grade_code_dtl_id = A.like_grade_code_dtl_id
AND C.price_list_hdr_id = p_price_list_hdr_id
AND D.price_list_hdr_id = C.price_list_hdr_id
AND E.grade_code_dtl_id = B.grade_code_dtl_id
ORDER BY grade_pool_code, grain_class_name; -- Changed to sort on long name
EXCEPTION
WHEN OTHERS THEN
p_status := 'Failure: ' || SQLERRM;
END get_Sales_Grades;
|