Roy Harvey
3/31/2007 5:30:00 PM
Just to cover the basics...
You are running SQL Server 2005?
The database is in compatability level 90?
The command also has a reference to the CTE, as well as the CTE
itself? I get the complaint about the closing parentheses if I run
just what was posted, but the following works as expected.
WITH ASDF AS
(
SELECT 123 as A
)
select * from ASDF
Roy Harvey
Beacon Falls, CT
On 31 Mar 2007 10:07:32 -0700, "cmay" <cmay@walshgroup.com> wrote:
>I can't get any CTE to work, even something this simple:
>
>WITH ASDF AS
> (
> SELECT 123 as A
> )
>
>
>Every CTE I try to create gives me the same error:
>
>Incorrect syntax near ')'
>for the final ")"
>
>Can anyone make a suggestion?