Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
edusqluser
Starting Member
15 Posts |
Posted - 2009-09-02 : 17:12:47
|
| I am using the following:'QUOTE PRICE' = CAST( CASE WHEN o.QuotePrice = NULL THEN 0 ELSE CASE ISNULL(omnd.PercentageOfOrder,0) WHEN 0 THEN o.QuotePrice ELSE o.QuotePrice * (ISNULL(omnd.PercentageOfOrder,0)/100) END END AS DECIMAL(14,2))What function can I use in conjunction with this to obtain the leading zeros of 12?THX, EDUSQLUSER |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-09-02 : 17:16:18
|
| [code]REPLACE(STR( CASE WHEN o.QuotePrice = NULL THEN 0 ELSE CASE ISNULL(omnd.PercentageOfOrder,0) WHEN 0 THEN o.QuotePrice ELSE o.QuotePrice * (ISNULL(omnd.PercentageOfOrder,0)/100) END END, 14,2), ' ', '0') AS [QUOTE PRICE][/code] |
 |
|
|
edusqluser
Starting Member
15 Posts |
Posted - 2009-09-02 : 17:28:45
|
| Thanks. That did it...THX, EDUSQLUSER |
 |
|
|
|
|
|