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

Money conversion

Status
Not open for further replies.

msalvador

Programmer
Joined
Nov 13, 2001
Messages
33
Location
IT
HI, this is my problem.
I've a table PLU, there are two fields
barcode(varchar(50)),
price(money)

I try to make a search with like condiction but it's doesn't work if price have two or more(four) decimal places.
Because money have always four decimal places.

Ex.

barcode | price |
------------------
1 |150
2 |12.3000
3 |33.33
4 |3



select * from PLU where where cast(RP_ProductPrice as varchar) like '%3'

i'd like to obtain:

barcode | price |
------------------
2 |12.3000
3 |33.3300
4 |3


 
If you want all prices that contain a 3 change your like '%3' to '%3%'
 
no only the price that finished with 3
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top