Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert money value to spaces

Status
Not open for further replies.
Dec 13, 2002
109
GB
Hi

Is it possible to convert a money value to spaces?

e.g. 01 to " " (not the quotes but two spaces)

Can integers be converted as well?

Ron
 
Not sure what you want

select space(len(convert(varchar(100),@val)))


======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
You can do it, but you can't keep it as MONEY or INT. You'll need to convert it to a string and then replace the value.

SELECT REPLACE((CONVERT(VARCHAR(2), money_column_value)), '01', ' ')


-SQLBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top