SQL Server 2008 doesn't have "date" type ...

  • Hi

    I had this problem in Express edition, then I've installed SQL Server 2008 Developer from MSDN. When I try to execute DB script I recive an error

    CREATE TABLE [dbo].[Companies](

    [idCompany] [int] IDENTITY(1,1) NOT NULL,

    [name] [nchar](10) NOT NULL,

    [regon] [nchar](14) NOT NULL,

    [dateInserted] [date] NOT NULL,

    [Type] [nchar](2) NOT NULL,

    Column, parameter, or variable #4: Cannot find data type date.

    My friend has exact the same SQL Server and he has no problems with it.

    Microsoft SQL Server Management Studio10.0.1600.22 ((SQL_PreRelease).080709-1414 )

    Microsoft Analysis Services Client Tools2007.0100.1600.022 ((SQL_PreRelease).080709-1414 )

    Microsoft Data Access Components (MDAC)2000.085.1132.00 (xpsp.080413-0852)

    Microsoft MSXML2.6 3.0 5.0 6.0

    Microsoft Internet Explorer8.0.6001.18702

    Microsoft .NET Framework2.0.50727.3082

    Operating System5.1.2600

    Help please

  • could it be the compatibility level of the database you are using?

    you'd get that syntax error if you were in a non-compatibility 100 database...

    that's the first thing I'd check;

    for example, switch to tempdb and see if you check syntax, everything works (don't need to execute it there)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply