Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Wierd Error in CROSS APPLY
When I run these statement below, it works.

select * from fn_getsubtree(1) AS ST
select * from Departments

However, when I run this statement below with CROSS APPLY, I get an error:
SELECT d.deptid
FROM Departments AS D
cross APPLY fn_getsubtree(D.deptmgrid) AS ST

The error message is:
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '.'.

What am I doing worng here?.

Thanks,
Ganesh

Report this thread to moderator Post Follow-up to this message
Old Post
Ganesh Muthuvelu
12-29-05 01:23 AM


Re: Wierd Error in CROSS APPLY
Hi

This is effectively the same example as in SQL 2005 Books online, and it
works fine for me!!

Are you one the RTM version?

Do you have a case sensitive collation?

John
"Ganesh Muthuvelu" < GaneshMuthuvelu@disc
ussions.microsoft.com> wrote in
message news:B13248E1-CF2A-437E-9F88- 0AA3B55B08DB@microso
ft.com...
> When I run these statement below, it works.
>
> select * from fn_getsubtree(1) AS ST
> select * from Departments
>
> However, when I run this statement below with CROSS APPLY, I get an error:
> SELECT d.deptid
> FROM Departments AS D
>  cross APPLY fn_getsubtree(D.deptmgrid) AS ST
>
> The error message is:
> Msg 102, Level 15, State 1, Line 3
> Incorrect syntax near '.'.
>
> What am I doing worng here?.
>
> Thanks,
> Ganesh



Report this thread to moderator Post Follow-up to this message
Old Post
John Bell
12-29-05 12:23 PM


Re: Wierd Error in CROSS APPLY
Most probably the database compatibility level is lower than 90. I tried the
 example in a new
database. It worked fine. I then lowered compatibility level to 80 and got t
he exact same error as
Ganesh posted.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/
Blog: http:// solidqualitylearning
.com/blogs/tibor/


"John Bell" < jbellnewsposts@hotma
il.com> wrote in message
 news:%23ndj%23MGDGHA
.2704@TK2MSFTNGP15.phx.gbl...
> Hi
>
> This is effectively the same example as in SQL 2005 Books online, and it w
orks fine for me!!
>
> Are you one the RTM version?
>
> Do you have a case sensitive collation?
>
> John
> "Ganesh Muthuvelu" < GaneshMuthuvelu@disc
ussions.microsoft.com> wrote in me
ssage
> news:B13248E1-CF2A-437E-9F88- 0AA3B55B08DB@microso
ft.com... 
>
>


Report this thread to moderator Post Follow-up to this message
Old Post
Tibor Karaszi
12-29-05 12:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 04:07 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006