like function Querry



IBM's flagship relational database management system

like function Querry

Postby krishnakumar15 » Tue Jan 06, 2015 2:52 pm

Hi,

I have to retrive name for an employee who joined this year

Employee number is 15 digit character. first 2 digits of employee number contains year of joining
e.g: 1434234235345345452
1523234234234234453

querry is like this


select empl_name from emp where empl_no= ?
i am using:
empl_no like (CHAR(MOD(YEAR(CURRENT DATE),100)))

function (CHAR(MOD(YEAR(CURRENT DATE),100))) returns 15 but like operator is not accepting it

pls help!
krishnakumar15
 
Posts: 3
Joined: Thu Jul 17, 2014 11:55 am
Has thanked: 0 time
Been thanked: 0 time

Return to DB2

 


  • Related topics
    Replies
    Views
    Last post