Write the default value when oracle statistics are not recorded

Source: Internet
Author: User
Welcome to the Oracle community forum and interact with 2 million technical staff to enter the default value selectnvl (max (t1.packagesize), 0) from (selectdecode (count (t. per_bus_code), 0, 1) per_bus_code, decode (count (t. buss_code), 0, 1) buss_code, decode (count (t. pe

Welcome to the Oracle community forum to interact with 2 million technical staff> enter the default select nvl (max (t1.packagesize), 0) When oracle statistics are not recorded) from (select decode (count (t. per_bus_code), 0, '1') per_bus_code, decode (count (t. buss_code), 0, '1') buss_code, decode (count (t. pe

Welcome to the Oracle community forum and interact with 2 million technical staff> enter

Write the default value when oracle statistics are not recorded

Select nvl (max (t1.packagesize), 0)

From (

Select decode (count (t. per_bus_code), 0, '1') per_bus_code, decode (count (t. buss_code), 0, '1') buss_code, decode (count (t. per_code), 0, '1') per_code

From t_tybook_back_pers_business t

Where t. per_code = 'ty-00000106'

And t. end_date> sysdate

And t. start_date <= sysdate) t

Left join t_tybook_before_business t1 on t. buss_code = t1.code

Group by t. per_code;

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.