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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert varchar to Money 1

Status
Not open for further replies.

richrich05

Programmer
Aug 15, 2005
24
0
0
US
I'm trying to convert a varchar field into a money but I'm running into problems because the column contains some rows that are credits that have () around them. The expression I'm trying is listed below.

Select cast(E_Amt As Money) AS Amount
From Tbl_Expenses
Oder by E_Amt


Your help would be truly appreciated.
 
not sure if this the best way to write this...
Select cast(replace(replace(E_Amt,')',''),'(','') As Money) AS Amount
From Tbl_Expenses
Oder by E_Amt
 
Niceeee That worked perfect, I didn't even think of wirting it that way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top