Insert

  • July 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Insert as PDF for free.

More details

  • Words: 331
  • Pages: 1
INSERT WHEN (deptno)=14 THEN INTO emp (empno, ename) VALUES (empno, ename) WHEN (deptno)=11 THEN INTO emp (empno, ename) VALUES (empno, ename) ELSE INTO EMP (empno, ename) VALUES (empno, ename) SELECT empno , ename, deptno from emp; -----------------INSERT ALL INTO sales (prod_id, cust_id, time_id, amount) VALUES (product_id, customer_id, weekly_start_date, sales_sun) INTO sales (prod_id, cust_id, time_id, amount) VALUES (product_id, customer_id, weekly_start_date+1, sales_mon) INTO sales (prod_id, cust_id, time_id, amount) VALUES (product_id, customer_id, weekly_start_date+2, sales_tue) INTO sales (prod_id, cust_id, time_id, amount) VALUES (product_id, customer_id, weekly_start_date+3, sales_wed) INTO sales (prod_id, cust_id, time_id, amount) VALUES (product_id, customer_id, weekly_start_date+4, sales_thu) INTO sales (prod_id, cust_id, time_id, amount) VALUES (product_id, customer_id, weekly_start_date+5, sales_fri) INTO sales (prod_id, cust_id, time_id, amount) VALUES (product_id, customer_id, weekly_start_date+6, sales_sat) SELECT product_id, customer_id, weekly_start_date, sales_sun, sales_mon, sales_tue, sales_wed, sales_thu, sales_fri, sales_sat FROM sales_input_table; ------------------------select regexp_substr(string_to_parse,'[^,]+',1,i) into l_value from dual; ------------------------WIDTH_BUCKET lets you construct equiwidth histograms, in which the histogram range is divided into intervals that have identical size. (Compare this function with NTILE, which creates equiheight histograms.) Ideally each bucket is a closed-open interval of the real number line. For example, a bucket can be assigned to scores between 10.00 and 19.999... to indicate that 10 is included in the interval and 20 is excluded. This is sometimes denoted [10, 20). For a given expression, WIDTH_BUCKET returns the bucket number into which the value of this expression would fall after being evaluated. expr is the expression for which the histogram is being created. This expression must evaluate to a numeric or datetime value or to a value that can be implicitly converted to a numeric or datetime value. If expr evaluates to null, then the expression returns null. min_value and max_value are expressions that resolve to the end points of the acceptable range for expr. Both of these expressions must also evaluate to numeric or datetime values, and neither can evaluate to null. num_buckets is an expression that resolves to a constant indicating the number of buckets. This expression must evaluate to a positive integer. ---------------------------------

Related Documents

Insert
August 2019 38
Insert
July 2020 18
Fluverin Insert
June 2020 14
Insert 2
April 2020 15
Perclot Insert
May 2020 16
Lap Insert
May 2020 12