Maybe sounds like a dumb question but here is my situation:
I have a table with integer type field (name PartnerID).
I need to create a view on this table and adds (actually replaces) leading zeros to the integer field.
Example for field (PartnerID)
11235
11567
11567
22789
22657
22456
33567
Should be (in view):
00235
00567
00567
00789
00657
00456
33567
Since thats impossible what are my options?
EDIT: Im not adding zeros im replacing.
Here is the current formula for the field PartnerID in the view, but this just ignores the leading zeros. I want to have leading zeros based on this formula in my view.
CASE WHEN (LEN(PartnerID) = 5 AND (PartnerID LIKE '11%' OR
PartnerID LIKE '22%')) THEN stuff(PartnerID, 1, 2, '00') ELSE PartnerId END AS PartnerID
Regards
Try converting the Integer PartnerId to a string e.g: