I understand this but the fact that you want different handling based on the value will blow your performance. You could do something like this but it just doesn't make any sense:DECLARE @table table (Amount decimal (18, 2))INSERT INTO @table SELECT 5000 UNION ALL SELECT 3000.45SELECT CASE WHEN Amount - ROUND(Amount, 0) <> 0 THEN CAST(Amount as varchar(30)) ELSE CAST(CAST(Amount as decimal(18, 0)) as varchar(30)) ENDFROM @table
- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com