ORA-00932: inconsistent data types: Should be-, but get-

Source: Internet
Author: User

 

An inexplicable error occurs during stored procedure calling:

ORA-00932: inconsistent data types: Should be-, but get-

 

Refer to the online analysis for the following reasons .... loop Method: Use a cursor. Previously, because the field names to be used are the same, no error is reported when c_row.prod_code is changed to c_row.fund_code, this error is reported because c_row has already specified the fields when it is used for the first time. Only the same fields can be obtained.

 

-- Check whether the multi-icing product has not been added to the assessment product table. If not, add it.
V_exectime: = sysdate;
For c_row in (
Select a. prod_code | '-' | A. prodalias_name | '-automatically added to the evaluation product table' as MSG, .*
From [email protected]
Where a. prod_name like '% %' and A. prod_code not in (select cpbh from t_jxkh_khcp)
)
Loop
Insert into partition (cpbh, SSGs, cpmc, cplb, cpzt, zczsbl, sfjskhj, tcblfs, tcbl, cosine, xfrq, hdqsrq, hdjzrq, kzbs, BZ, cosine, lrrq, cosine, zhxgsj, is_kfjj, is_k2, srlx)
Values (c_row.prod_code, null, c_row.prodalias_name, '2', '1', 0.60000, '0', null, null, 0, null, 1, to_char (sysdate, 'yyyymmdd'), 1, sysdate, 0, 0, 0 );

Insert into t_gfcp (stockcode, stockname, invalid, percent, is_js_sg, percent_bank, is_khjl)
Values (c_row.prod_code, c_row.prodalias_name, 1, 0.6, 0, 0.6, 0 );


End loop;

 

-- Check whether the multi-rich product has not been added to the assessment product table. If not, add the product.
V_exectime: = sysdate;
For c_row2 in (
Select a. fund_code | '-' | A. fund_name | '-not included in the assessment product table' as MSG, A. * from [email protected]
Where a. fund_name like '% %' and A. fund_code not in (select cpbh from t_jxkh_khcp)
)
Loop

Insert into partition (cpbh, SSGs, cpmc, cplb, cpzt, zczsbl, sfjskhj, tcblfs, tcbl, cosine, xfrq, hdqsrq, hdjzrq, kzbs, BZ, cosine, lrrq, cosine, zhxgsj, is_kfjj, is_k2, srlx)
Values (c_row2.fund_code, null, c_row2.fund_name, '2', '1', 0.60000, '0', null, null, 0, null, 1, to_char (sysdate, 'yyyymmdd'), 1, sysdate, 0, 0, 0 );

Insert into t_gfcp (stockcode, stockname, invalid, percent, is_js_sg, percent_bank, is_khjl)
Values (c_row2.fund_code, c_row2.fund_name, 1, 0.6, 0, 0.6, 0 );

-- Text message notifications are too troublesome.
-- Agfhd_p_sendsms ('2017 130000046 ', c_row.msg );
End loop;

ORA-00932: inconsistent data types: Should be-, but get-

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.