Reputation: 67
Can you tell me what am I doing wrong here? Trying to use subtraction here in SQL Server 2005 SELECT
statement. There's some type of syntax error here.
isnull(dbo.udf_GetInventory(ga.sku,@date4),0) * costprice -
isnull(dbo.udf_GetInventory(ga.sku,@date3),0) * costprice as date2_diff
Upvotes: 0
Views: 172
Reputation: 139010
There is no syntax-error here if:
Upvotes: 4
Reputation: 8951
Not sure about a syntax error, but assuming udf_GetInventory is non-deterministic you're going to get 0 every time...
Upvotes: 0