Calculate days between ordering and shipping, PL-SQL Programming

An analyst in the quality assurance office reviews the time lapse between receiving an order and shipping an order. Any orders that have not been shipped within a day of the order being placed are investigated. Create a function named ORD_SHIP_SF that calculates the number of days between the date the basket was created and the shipping date. The function should return a character string that indicates "OK" if the order was shipped within a day or "CHECK" if it was not. The IDSTAGE column of the BB_BASKETSTATUS table indicates the item is shipped with a value of 5 and the DTSTAGE column is the shipping date. The TDORDERED column of the BB_BASKET table is the order date. Use the function in an anonymous block that uses a host variable to receive the basket id to check basket 3.

Posted Date: 3/12/2013 2:03:02 AM | Location : United States

Related Discussions:- Calculate days between ordering and shipping, Assignment Help, Ask Question on Calculate days between ordering and shipping, Get Answer, Expert's Help, Calculate days between ordering and shipping Discussions

Write discussion on Calculate days between ordering and shipping
Your posts are moderated
Related Questions
PRIMARY KEY: PRIMARY KEY  indicates that the table is subject to a key constraint, in this case declaring that no two rows in the table assigned to ENROLMENT can ever have the

%NOTFOUND The %NOTFOUND is logical, opposite of the %FOUND. The %NOTFOUND yields FALSE if the last fetch returned a row, or TRUE when the final fetch failed to return a row. I

%TYPE Attribute The %TYPE attribute gives the datatype of a record, field, nested table, database column, or the variable. You can use the %TYPE attribute as the datatype speci

Positional Notation The first procedure call uses the positional notation. The PL/SQL compiler relates the first actual parameter, account, with the first proper parameter, ac

Initial thought process: Design a script which was simple and user friendly. Integrate procedures/functions to extract data under the hood. I focused on giving the user the opt

Primary Key - SQL A PRIMARY KEY specification carries an implicit NOT NULL constraint on each column of the specified key. When more than one key constraint is required, the k

Effects of NULL for Table Expression Here's an important distinction between expressions denoting tables and expressions denoting multisets of rows: a table expression cannot

Database Values You can use the SELECT statement to have the Oracle assign values to a variable. For Each and every item in the select list, there must be a matching, type-compa

DELETE Command - SQL Loosely speaking, DELETE removes some existing rows from its target table. Suppose the university decides that course C3 is to be withdrawn. Example shows