Wednesday, September 03, 2014

Error: Incorrect syntax near the keyword 'AS' on SQL Server 2005.

Error: Incorrect syntax near the keyword 'AS' on SQL Server 2005.

I got this error when I created SQL script from SQL Server 2008 and tried to run on SQL Server 2005.

CREATE TYPE EmployeeIDType AS TABLE
(
   ID         Int
)
GO

Cause: Table Type is not supported by SQL Server 2005, Table type introduced in new version of SQL Server 2008 and above.

AlterNet way to fulfill table type parameter requirement in SQL Server 2005 is to pass XML or use NVARCHAR(MAX) as input parameter

SQL Server 2005

Oracle

4 comments:

Cindy Dy said...

You are an awesome blogger. This is one of the best blog I had visited so far. Hope to read more post from you in the future. Keep it up. God bless.

Bubble
www.gofastek.com

Cindy Dy said...

You are an awesome blogger. This is one of the best blog I had visited so far. Hope to read more post from you in the future. Keep it up. God bless.

Bubble
www.gofastek.com

Cindy Dy said...

You are an awesome blogger. This is one of the best blog I had visited so far. Hope to read more post from you in the future. Keep it up. God bless.

Bubble
www.gofastek.com

Silvia Jacinto said...


I really love your blog there's a lot to share. Keep it up.Visit my site too.

n8fan.net

www.n8fan.net