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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Problem with the following expression

Author  Topic 

gamaz
Posting Yak Master

104 Posts

Posted - 2009-05-14 : 14:37:17
Hi
I have the following expression as a part of a view. This expression is not parsing. Rest is fine. I am not sure where I am making the mistake. I appreciate any help for resolution of this issue. Thanks

CAST(COALESCE (qrptCartonsDone.CtnsDone, 0.00) * tblParts.PcsPerCtn / 1000.0 * tblParts.HrsPer1000) AS DECIMAL(10, 2)) AS HrsSpent,

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-05-14 : 22:07:57
[code]
CAST((COALESCE (qrptCartonsDone.CtnsDone, 0.00) * tblParts.PcsPerCtn / 1000.0 * tblParts.HrsPer1000) AS DECIMAL(10, 2)) AS HrsSpent,
[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

gamaz
Posting Yak Master

104 Posts

Posted - 2009-05-15 : 13:04:06
Thanks for your help Khtan. I found out my mistake shortly after the posting. In any event I appreciate it very much. Thanks.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-15 : 13:08:56
is the casting required? you're already using decimal values in operation so result will be decimal.
Go to Top of Page
   

- Advertisement -