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 |
|
abhwhiz
Starting Member
37 Posts |
Posted - 2007-07-31 : 11:13:16
|
| Hi all,Please guide me, I am not able to figure out what the error is ...the query is given below..SELECT StoreName=s.Name, [Top].ShipDate, [Top].SalesOrderID, TotalDue='$'+[Top].TotalDueFROM AdventureWorks.Sales.Store AS sJOIN AdventureWorks.Sales.Customer AS cON s.CustomerID = c.CustomerIDCROSS APPLYAdventureWorks.Sales.fnTopNOrders(c.CustomerID, 5) AS [Top]WHERE CustomerType='S'ORDER BY StoreName, convert(money,TotalDue) DESCall i get is an error:-Msg 102, Level 15, State 1, Line 7Incorrect syntax near '.'.is this is a "service pack" problem? i am not able to figure out, i tried other examples given in net/books as well, but i am getting the same error.. :(Thanks in advance.. |
|
|
senpoly
Starting Member
19 Posts |
Posted - 2007-07-31 : 11:19:06
|
| this is compatibility problem, as cross apply will work only on 90 compatibility, where as your database may be set as 80 or belowregardssenthil |
 |
|
|
kapilarya
Yak Posting Veteran
86 Posts |
Posted - 2007-07-31 : 11:23:14
|
| Put some test table and test data to evalute the problemKapil Arya |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-08-01 : 02:16:47
|
| As said check for the compatibility. Also it seems you are trying to format the money value which should be done in front end application if the data are shown thereMadhivananFailing to plan is Planning to fail |
 |
|
|
abhwhiz
Starting Member
37 Posts |
Posted - 2007-08-01 : 05:08:14
|
| :senthilyup, u were right, it was a compatibility issue, it worked fine when i changed the comaptibility:madhipoint taken!thanks a lot.. |
 |
|
|
|
|
|
|
|