Table name a reserved word in the future

  • I am getting ready to do an upgrade of a fairly large ASP app from 6.5 to 2000. And I was going through a list of the reserved words and found out that catalog is going to be a reserved word in the future release of 2000 SPs.

    Now this table is a very important table in my app and I was wondering how should I go about it. Right now with SQL 2000 there is no problem. But, when a new SP comes out catalog will be a reserved word and it will create havoc.

    The app is an ASP app and it has 100 of pages which are accessing this table catalog.

    Where should I start and what is the best way to go about?

    P.S Any gotchas I have to be aware of 6.5 to 2000 upgrade as well?

    Thanks

  • Even if the object is a reserved word, the object can be qualified using brackets [] as this example demonstrates:

    CREATE TABLE [Table] (
    
    TableID int IDENTITY)
    GO
    WHILE (@@IDENTITY < 10) OR (@@IDENTITY IS NULL)
    
    INSERT [Table] DEFAULT VALUES
    SELECT * FROM [Table]
    
    GO
    DROP TABLE [Table]
    
    GO

    K. Brian Kelley

    bkelley@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/bkelley/

    K. Brian Kelley
    @kbriankelley

  • Well , as long as I put the table names within

    then I should be fine right? Thats good news. Now will this affect any performance degradation somehow though?

    Thanks

  • No, it will not effect performance. Qualifing a name tells SQL to override and accept the entered value.

  • Do a global search and replace in ASP or a search and recompile in SQL to add the brackets. No impact on the server. Just tells the parser not to burp.

    Steve Jones

    steve@dkranch.net

Viewing 5 posts - 1 through 4 (of 4 total)

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