the [Zip] original data type: varchar (10), value 820010121, 085492561...
I would like to get first 5 digits of zip code only.
My data item: trim(substring(cast([zip], varchar(10)), 1, 5))
Zip code with value:
820010121 return '82001' - WORKED
085492561 return '85492' - NOT WORKED - missing '0' at front. How would I fix this?
Thank you
If its already a varchar(10) data item you should not need to trim - substring([Zip], 1, 5) should work.
Hope this helps.
Adam.
Sorry for this, but i just check original data in Toad, the zipcode with 0 in the front show up '23562639', so it is missing '0' from the raw data if it have 0 in front - and showed up as 8 digits only.
How could i fix it in cognos.
Thank you
Hello,
i got this from another topic. Thanks a lot.
From <https://www.cognoise.com/index.php?topic=32504.0>