I have following piece of code:
CREATE TYPE FTPLog AS TABLE (
[Date] datetime
,[LocalIPAddress] varchar(MAX)
,[LocalIPPort] varchar(MAX)
,[UserName] varchar(MAX)
,[SiteName] varchar(MAX)
,[HostName] varchar(MAX)
,[RemoteIPAddress] varchar(MAX)
,[RemoteIPPort] varchar(MAX)
,[Command] varchar(MAX)
,[CommandParameters] varchar(MAX)
,[BytesSent] int
,[BytesReceived] int
,[ElapsedMilliseconds] int
,[FtpStatus] varchar(MAX)
,[FtpSubStatus] varchar(MAX)
,[FullPath] varchar(MAX)
,[HRStatus] varchar(MAX)
,[SessionId] varchar(MAX)
,[Information] varchar(MAX)
)GO
When I try execute this, I got an error:
Line 1:
Incorrect syntax near the keyword 'AS'
What is wrong with it?
As @hvd said in the comment - this is SQL Server 2005, not 2008. SQL Server 2005 does not support it.