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!

SQL - how to shift decimal point

Status
Not open for further replies.

RichardTisdall

Technical User
Feb 15, 2005
5
GB
I am trying to compare product prices in two separate tables. The price in one table is data type real, 4 and in the other is smallmoney ,4. My prices are displayed like this.

(Real) (Smallmoney)
PriceSupp CPDPrice
930300.0 93.0300

Can anyone suggest how I can do some sort of conversion to be able to do the comparison.

I thought I could convert both to decimal or numeric bur this does not work. If I try to convert real to small money I get an overflow and if I convert small money to real the value changes to 93.0299. I suspect this causes further issues.

Any help greatly appreciated.
 
Oh, your right again...I see you're mistake. Don't worry about it, your older today then you were yesterday. Pretty soon you'll be as senile as I. [wiggle]
-Karl
PS - I think I'll start tormenting you intentionally instead of just accidentally...and you won't know which is which! :)

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top