Home » SQL & PL/SQL » SQL & PL/SQL » Please help on merge satatement
Please help on merge satatement [message #254346] Thu, 26 July 2007 09:36 Go to next message
hsinghalmrt
Messages: 51
Registered: March 2005
Member
Dear All,

I am getting error ORA-06502 PL/SQL Numeric or value error: character to number conversion error.

i have checked all the data types.

Please help.

MERGE INTO REQ_TEXTS des
USING (SELECT *
FROM req_notes_view
WHERE req_id = p_req_id
AND req_supplement_no = p_req_ver_no
AND
req_line_no = p_req_line_no
AND text_id NOT IN ('S_REASON' ,'SUPP')
AND rtt_text_print_pos!= 'C'
) src
ON ( des.rfq_quote_id = p_rfq_quote_id
AND des.rfq_quote_suffix = p_rfq_quote_suffix
AND des.rfq_quote_supplement_no = p_rfq_quote_ver_no
AND des.rfq_quote_line_no = p_rfq_quote_line_no
AND des.text_id = src.text_id
)
WHEN MATCHED THEN
UPDATE
SET des.text = src.text
,des.rt_print_seq = NVL (src.rt_print_seq, src.rtt_text_print_seq_no)
,des.last_update_date = SYSDATE
,
des.last_updated_by = USER
WHEN NOT MATCHED THEN

INSERT (des.req_text_id
,des.rfq_quote_id,des.rfq_quote_suffix ,des.rfq_quote_supplement_no,des.rfq_quote_line_no
,des.text_id ,des.text ,des.rt_print_seq
,last_update_date,last_updated_by)
VALUES (req_text_id_seq.NEXTVAL
,p_rfq_quote_id ,p_rfq_quote_suffix ,p_rfq_quote_ver_no ,p_rfq_quote_line_no
,src.text_id ,src.text ,NVL (src.rt_print_seq, src.rtt_text_print_seq_no)
,SYSDATE ,USER);
Re: Please help on merge satatement [message #254348 is a reply to message #254346] Thu, 26 July 2007 09:38 Go to previous messageGo to next message
BlackSwan
Messages: 25033
Registered: January 2009
Location: SoCal
Senior Member
Please read & FOLLOW posting guidelines as stated in STICKY post at top of this forum; especially part about using "code tags".
Re: Please help on merge satatement [message #254356 is a reply to message #254346] Thu, 26 July 2007 09:55 Go to previous message
hsinghalmrt
Messages: 51
Registered: March 2005
Member
Dear All,

Please do not respond to this, it has been resolved.

The problem was anywhere else.

Thanks.
Himanshu
Previous Topic: Need help for locks related issue
Next Topic: query to get message between two dates
Goto Forum:
  


Current Time: Fri Dec 02 20:50:15 CST 2016

Total time taken to generate the page: 0.27910 seconds