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
Example of Check Constraints Example: Workaround for when subqueries not permitted in CHECK constraints CREATE FUNCTION NO_MORE_THAN_20000_ENROLMENTS ( ) RETURNS BOOLEAN

Demonstrate your knowledge of PL/SQL programming by writing and thoroughly testing triggers and stored procedures associated with an e-commerce application that provides security l

Benefit of the dynamic SQL: This part shows you how to take full benefit of the dynamic SQL and how to keep away from some of the common pitfalls. Passing the Names of Sc

Use Serially Reusable Packages To help you to manage the use of memory, the PL/SQL gives the pragma SERIALLY_ REUSABLE that mark some packages as serially reusable . So mark

Example of EXCEPT Operator - SQL Example, like its counterpart in the theory book, illustrates the convenience of allowing any table expression to be the source for an INSERT

Procedural Constraint Enforcement (Triggers) SQL has an alternative method of addressing database integrity, involving event-driven procedural code. The special procedures th

Use the RETURNING Clause Frequently, the application requires information about the row affected by a SQL operation, for illustration, to produce a report or take a subsequent

Pl/SQL Expressions The Expressions are constructed by using the operands and operators. An operand is a constant, literal, variable, or function call which contributes a value

Define basic operators of relational algebra with an example each

%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