Zero Fill a number in ColdFusion
Posted on 2009-12-21
I need to have a 10 character field on a SQL server table that contains all numberics as an account number. I want it as character so I can display it as zero filled to the left. EG, "000000018" .
Q: Using Coldfusion, how do I create the next sequential account id? If I retieve the column from the table, what do I get with :
<cfset newid = tableid + 1>
If I make the field a numneric field on the table (as an Identity), how do I display it with leading zeros? Is their a function for this?
Thanks in advance,