plsql - How to write a program to print the wishes based on the sys time? -


in pl/sql block, print 'good morning','good noon','good eve' based on system time have given input.
if time 6 12 pm has print morning else if lies between 12 pm 2 pm has print noon else if has print eve. can give me idea? advance gives me guidance.

i think, know how anonymous block looks (reminder below):

declare   -- variables' / constants' / types' / etc. declarations begin   -- logic end; / 

you can create date variables or constants follows:

l_in_date <constant> date := to_date(<date>,<date_mask>); 

then can use if..then statement , print out result according conditions (http://www.techonthenet.com/oracle/loops/if_then.php):

if <condition>   -- logic elsif <condition>   -- logic else   -- logic end if; 

i believe, should able create anonymous block using information above.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -