Subject | Re: CORRECTION Re: [firebird-support] formatting a number |
---|---|
Author | Grant Brown |
Post date | 2005-04-28T00:04:55Z |
Hi all,
The solution that I finally used was really simple
/* format the new document number */
if (New_No<10) then New_No_Tx = '0000'|| cast(New_No as VarChar(20));
else if (New_No<100) then New_No_Tx = '000'|| cast(New_No as
VarChar(20));
else if (New_No<1000) then New_No_Tx = '00'|| cast(New_No as
VarChar(20));
else if (New_No<10000) then New_No_Tx = '0'|| cast(New_No as
VarChar(20));
else New_No_Tx = cast(New_No as VarChar(20));
works for me.
--
Regards,
Grant Brown
Product Development Manager
Phone : 02 4229 1185
Mobile : 0412 926 995
Email : grant@...
Web : www.sitedoc.com.au
SiteDoc - Easy to Use - Powerful Results
The solution that I finally used was really simple
/* format the new document number */
if (New_No<10) then New_No_Tx = '0000'|| cast(New_No as VarChar(20));
else if (New_No<100) then New_No_Tx = '000'|| cast(New_No as
VarChar(20));
else if (New_No<1000) then New_No_Tx = '00'|| cast(New_No as
VarChar(20));
else if (New_No<10000) then New_No_Tx = '0'|| cast(New_No as
VarChar(20));
else New_No_Tx = cast(New_No as VarChar(20));
works for me.
--
Regards,
Grant Brown
Product Development Manager
Phone : 02 4229 1185
Mobile : 0412 926 995
Email : grant@...
Web : www.sitedoc.com.au
SiteDoc - Easy to Use - Powerful Results