SET SERVEROUTPUT ON
/
DEFINE V_DATE_TODAY = '23-04-2011';
/
DECLARE
DAY_TODAY VARCHAR2(30);
DAY_NEXT_WORKING_DAY VARCHAR2(30);
DATE_NEXT_WORKING_DAY VARCHAR2(30);
BEGIN
SELECT REPLACE(TO_CHAR(TO_DATE('&V_DATE_TODAY','dd-MM-yyyy'), 'DAY'),' ',NULL) INTO DAY_TODAY FROM DUAL;
SELECT CASE DAY_TODAY
WHEN 'MONDAY' THEN 'TUESDAY'
WHEN 'TUESDAY' THEN 'WEDNESDAY'
WHEN 'WEDNESDAY' THEN 'THURSDAY'
WHEN 'THURSDAY' THEN 'FRIDAY'
WHEN 'FRIDAY' THEN 'MONDAY'
WHEN 'SATURDAY' THEN 'MONDAY'
WHEN 'SUNDAY' THEN 'MONDAY'
END
INTO DAY_NEXT_WORKING_DAY FROM DUAL;
SELECT NEXT_DAY(TO_DATE('&V_DATE_TODAY','dd-MM-yyyy'), DAY_NEXT_WORKING_DAY) INTO DATE_NEXT_WORKING_DAY FROM DUAL;
DBMS_OUTPUT.PUT_LINE('DATE TODAY :' || '&V_DATE_TODAY');
DBMS_OUTPUT.PUT_LINE('DAY TODAY :' || DAY_TODAY);
DBMS_OUTPUT.PUT_LINE('DATE NEXT WEEK DAY :' || DATE_NEXT_WORKING_DAY);
DBMS_OUTPUT.PUT_LINE('DAY NEXT WEEK DAY :' || DAY_NEXT_WORKING_DAY);
END;
/
Subscribe to:
Post Comments (Atom)
Azure OpenAI Architecture Patterns & Deployment Patterns
Sharing some useful links that will help customers architect Azure OpenAI solution using the best practices: (1) Azure OpenAI Landing Zone r...
-
Setting up a MPI cluster on Ubuntu involves the following steps: 1. Install OpenMPI on all machines. $sudo apt-get install libopenmpi-de...
-
Very Useful Link: http://people.cc.ku.edu/~grobe/intro-to-LSL/index.html#particle Using the Linden Script Language This page is a short...
-
float p_size = 0.1; default { state_entry() { llSay(0, "Hello, Avatar!"); llSetPrimitiveParams( [ PRIM_...
No comments:
Post a Comment