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
Iteration Schemes The bounds of a loop range can be variables, literals, variables, or expressions but must compute to integers. Below are some of the examples. As you can see t

Count Operator in SQL Example: Counting the students who have scored more than 50 in some exam (SELECT COUNT (*) FROM (SELECT DISTINCT StudentId FROM EXAM_MARK WHE

Transaction Control The Oracle is transaction oriented; that is, Oracle uses the transactions to make sure the data integrity. The transaction is a sequence of SQL data manip

EXECUTE Privilege To call an invoker-rights routine straightforwardly, the users should have the EXECUTE privilege on that routine. By yielding the privilege, you permit a user

EXIT The EXIT statement forces a loop to done unconditionally. Whenever an EXIT statement is encountered, the loop is done immediately and controls the passes to the next statem

Using ROLLBACK The ROLLBACK statements end the present transaction and undo any change made during the transaction. The Rolling back is helpful for two reasons. Firstly, if yo

Extension and AND in SQL The theory book gives the following simple example of relational extension in Tutorial D: EXTEND IS_CALLED ADD ( FirstLetter ( Name ) AS Initial )

Advantages of Invoker Rights The Invoker-rights routines centralize the data retrieval. They are particularly helpful in applications which store data in various schemas. In su

What Is a Record  ? A record is a group of related data items that stored in the fields, each with its own name and datatype. Assume that you have different data about an em

THEO R Y OF CATASTROPHISM OR CATALYSM (CUVIER 1769-1832) - The world has passed thorugh several stages and at the end of each stage there was a catastrophe killing all the