|
Posted by Roy Harvey on 02/22/07 18:33
declare @m money
set @m = $1.25
select @m, RIGHT(REPLICATE('0',8) +
convert(varchar(8),convert(int,@m*100)),8)
Roy Harvey
Beacon Falls, CT
On 22 Feb 2007 10:15:08 -0800, paulmac106@gmail.com wrote:
>Ok my last formatting question.
>
>How can I insert a money value as a padded string in another table?
>
>example $1.25 gets inserted to another table as 00000125
>
>I want 8 total characters and no decimal
>
>another example would be 4,225.99 becomes 00422599
>
>can this be done?
>
>thank you!!
Navigation:
[Reply to this message]
|