Oracle Function code instance

Source: Internet
Author: User


Create or replace function gettaxcycle (www.2cto.com vv02 IN vv02_accounts_tin % ROWTYPE, returnoption in number) return number as tr12rec %% ROWTYPE; tg05rec %% ROWTYPE; taxcycle NUMBER; begin select * INTO tg05rec FROM tg05_tax_type_details WHERE cg02_tax_type = vv02.cg02 _ tax_type; CASE returnoption WHEN 1 then if tg05rec. cg05_ass_cycle is null then tg05rec. cg05_ass_cycle: = 1; end if; taxcycle: = tg05rec. cg05_ass_cycle; WHEN 2 then if tg05rec. cg05_pro_r_filing_cycle is null then tg05rec. cg05_pro_r_filing_cycle: = 1; end if; taxcycle: = tg05rec. cg05_pro_r_filing_cycle; end case; RETURN taxcycle; END gettaxcycle;

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.