Live ORACLE

if you are Oracle Developer ,than this Blog most likely will make you happy.

About my Blog

This Blog particularized for Oracle Developers ... you will see interesting Codes for SQL , PL/SQL as well as new ideas for Developer Suite and Client Tools that will help you in your professional life ... and I hope I reach for your satisfaction.

About Me

I'm Hany Freedom , 25 years old , I live in EL-Minia City in Egypt , I'm Moderator at ArabOUG.org the best Arabic Forum for ORACLE on the Net. if you interested to know more about me .... just Click Here.

Assigning Literals to an INTERVAL DAY TO SECOND Variable

DECLARE
lag_time INTERVAL DAY(3) TO SECOND(3);
BEGIN
lag_time := '7 09:24:30';
IF lag_time > INTERVAL '6' DAY THEN
DBMS_OUTPUT.PUT_LINE ( 'Greater than 6 days');
ELSE
DBMS_OUTPUT.PUT_LINE ( 'Less than 6 days');
END IF;
END;
/

Share/Save/Bookmark

2 comments:

  1. Anonymous said...
     

    Hi there , Your example is very clear , but if i need to pass a variable value for the interval

    say :
    LW_MIN := INTERVAL '+01 00:30:00' DAY TO SECOND;

    for the hard coded '+01 00:30:00' i need to pass a Variable , how can that be done pls help

  2. Anonymous said...
     

    Hi
    THis was the example i was looking for . MOst of the example exaplining the Interval day to second are taking values from the table and not directly assiging the value to the variable ..

Post a Comment



Newer Posts Older Posts Home Page
 
http://www.dpriver.com/images/sqlpp-banner-2.png

Thanks for reading my Blog ... you Visitor Number :-