selecting 12 char [message #394525] |
Fri, 27 March 2009 11:55  |
patdev
Messages: 74 Registered: August 2008
|
Member |
|
|
Hi,
i have oracle database on 9.2.0.6 and i am tring to do following:
I am trying to selecting the testid(varchar2(20)) and cast(testid as varchar(12)) but i get both column in result same rather than 12345678912100 and need 123456789121
select testid,test_NAME, cast(testid as varchar(12)) as New_ID from test.test_hrd
where test_name like '%mc%'
i get return but both new_ID and testid are same, the testid is 14 character and i need to select 12 in new column?
how can i do that?
|
|
|
|