Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Sybase question

  • 31-05-2001 4:10pm
    #1
    Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭


    For those of you interested:

    You can't drop a column in Sybase. What you can do though is:
    1>SELECT name, avatar, p45netshyte INTO TempTable FROM P45net
    2>GO
    1>DROP TABLE P45net
    2>GO
    1>SELECT name, avatar INTO boards FROM TempTable
    2>GO
    1>DROP TABLE TempTable
    2>GO
    1>COMMIT
    2>GO

    This will select from one table into another and drop the column p45shyte. Seem pretty simple doesn't it. It's taken 3 of us all afternoon to work that out. mad.gif Sheesh, I deserve a pint.


    [This message has been edited by Evil Phil (edited 31-05-2001).]


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    I need to know one of two things either:

    a) how do I drop a column of the database, all the usualls don't work.

    b) select from one table and intsert into another i.e.
    > CREATE TABLE boards AS SELECT * FROM p45net
    > GO



  • Closed Accounts Posts: 2 deadbeef


    The SELECT INTO syntax looks pretty similar to MS SQL Server. You could try :


    Alter Table P45Net Drop Column p45netshyte



  • Moderators, Social & Fun Moderators Posts: 10,501 Mod ✭✭✭✭ecksor


    MS SQL is based on sybase, and they both use T-SQL as their database language.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    DROP COLUMN isn't supported by Sybase so sometimes it works but mostly it doesn't, and if it f*cks up your on you own. I didn't work for us so I wrote the above.

    I didn't know Sybase used T-SQL, come to think of it, I don't know Sybase wink.gif.


Advertisement