Home Forums SQL Server 2005 Administering "Incorrect syntax near 'AS'. Expecting ID, '(', or PRIMARY" RE: "Incorrect syntax near 'AS'. Expecting ID, '(', or PRIMARY"

  • There's a comma before the AS where it shouldn't be.

    USE Master

    GO

    CREATE DATABASE AdventureWorks_snap021607 ON

    (NAME = AdventureWorks_Data, FILENAME = 'C:\AdventureWorks_data_021607.ss' ),

    (NAME = fg0103SALES , FILENAME = 'J:\AdventureWorks_FileGroups\FG0103SALES\0103SALES.ndf'),

    (NAME = fg0406SALES , FILENAME = 'J:\AdventureWorks_FileGroups\FG0406SALES\0406SALES.ndf'),

    (NAME = fg0708SALES , FILENAME = 'J:\AdventureWorks_FileGroups\FG0708SALES\0708SALES.ndf')

    AS SNAPSHOT OF AdventureWorks

    GO

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass