SQL Syntax Error

Hello everyone,

and sorry for disturbing you all on a Saturday, but I hope this is a quick and simple one...

I'm trying to add a new column to one of our existing Local Tables and have tried the following query

 

ALTER

 

TABLE dbo.LT_YVT_PERF_PRICE_LIMIT ADD COLUMN sold int

but it comes back with the following error

"Incorrect syntax near the keyword 'COLUMN'."

Can anyone help?

Many thanks and apologies for my uselessness, I'm sure it's something very obvious I'm missing.

Graeme

  • Former Member
    Former Member $organization

    No need for the "column" after "add"; should work with just

    ALTER TABLE dbo.tablename ADD columnname int

    Hope this helps.

  • Steven,

     

    That’s magical.  Many thanks

     

    Grae

     


    From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Steven Bras
    Sent: 10 January 2010 02:31
    To: Graeme Ellis
    Subject: Re: [Tessitura Technical Forum] SQL Syntax Error

     

    No need for the "column" after "add"; should work with just

    ALTER TABLE dbo.tablename ADD columnname int

    Hope this helps.

    From: Graeme Ellis <bounce-graemeellis3413@tessituranetwork.com>
    Sent: 1/9/2010 10:17:50 AM

    Hello everyone,

    and sorry for disturbing you all on a Saturday, but I hope this is a quick and simple one...

    I'm trying to add a new column to one of our existing Local Tables and have tried the following query

     

    ALTER

     

    TABLE dbo.LT_YVT_PERF_PRICE_LIMIT ADD COLUMN sold int

    but it comes back with the following error

    "Incorrect syntax near the keyword 'COLUMN'."

    Can anyone help?

    Many thanks and apologies for my uselessness, I'm sure it's something very obvious I'm missing.

    Graeme




    This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!
    ______________________________________________________________________
    This email has been scanned by the MessageLabs Email Security System.
    For more information please visit http://www.messagelabs.com/email YVinTag
    ______________________________________________________________________


    ______________________________________________________________________
    Registered name
    The Young Vic Company

    Registered office
    66 The Cut, London SE1 8LZ

    A company limited by guarantee, registered in England & Wales no:1188209

    This email has been scanned by the MessageLabs Email Security System.
    For more information please visit http://www.messagelabs.com/email YVoutTag
    ______________________________________________________________________