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
Using a join on 3 tables, select 5 columns and 10 rows from the 3 tables without the use of a Cartesian product Query: SELECT E.LAST_NAME, E.FIRST_NAME, S.BUILDING, S.BRAN

Keyword & Parameter Description: boolean_expression: This is an expression which yields the Boolean value that is TRUE, FALSE, & NULL. character_expression: This

Using Operator REF: You can retrieve refs by using the operator REF that, like VALUE, takes as its argument a correlation variable. In the illustration below, you retrieve one

Object Type: The object type is a user-defined composite datatype which encapsulates a data structure along with the functions and procedures required to manipulate the data

THEO R Y OF PANSPERMIA - Arrhenius (1908) postulated the cosmic panspermia theory that claims that organisms existed throughout the universe, and their spores, etc., could

Question 1 . Compare SQL and PL/SQL Question 2 . Write a database trigger to implement the following check condition                          Given the following table

Left and Right Joins LEFT OUTER JOIN can be used when you want to retrieve the data from the main table (table1) even if there is no match in other tables (table_2, table_3...

Fetching from a Cursor Variable The FETCH statement retrieve rows one at a time from the product set of a multi-row query. The syntax for the same is as shown: FETCH {curso

Many of the reports generated from the system calculate the total dollars in purchases for a shopper. Complete the following steps to create a function named TOT_PURCH_SF that acce

Dynamic SQL: The Most PL/SQL programs do a predictable, specific job. For illustration, a stored procedure may accept an employee number and salary increase, and then update t