extra space while I am concating two string (to_char)
H.Jan 29 2009 — edited Jan 29 2009Hello All,
Can anyone tell me why am I getting extra space ?
I ran "select concat(to_char(sysdate,'YYYY'),to_char(to_number(substr('20090001',5,8),'9999') + 1,'0009')) from patelh.new_hire_posn;"
and it gave me :
CONCAT(TO_CHAR(SYSDATE,'YYYY'),TO_CHAR(TO_NUMBER(SUBSTR('20090001',5,8),'9999')+1,'0009'))-----
*2009 0002*
1 rows selected
I want result like "20090002"... !!!!
I think I don't understand concept of to_char and to_number ...!!!!
Thank you,
H.
Edited by: H. on Jan 29, 2009 8:09 AM