If I execute the following SQL statement in SQL server 2008 it works perfectly, but when execute the same statement in SQL Server 2000 it doesn't work:
Statement:
select top 1
[k].[FixbiUnitPrice]
from (
select top (select COUNT(*)
from [dbo].[mnrFnBI_Fixed]('4E591E71-33BD-4ECC-8703-771BE8A76817') f)
[FixbiUnitPrice],
BDate,
biNumber
From [dbo].[mnrFnBI_Fixed]('4E591E71-33BD-4ECC-8703-771BE8A76817') f
where f.BAccCustID != 0x0
order by f.BDate desc,f.BNumber desc,f.biNumber desc
) [k]
Output in SQL Server 2000:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '('.
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'FixbiUnitPrice'.
What's wrong with syntax for SQL Server 2000