Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10

    Unanswered: Reserved Keywords - "platform"

    Curious one, this...

    The word "platform" is not on the Reserved Keywords (Transact-SQL) list.

    However, in Management Studio, the word is highlighted in pink as if it is.

    This isn't the first time I've come across words that are highlighted in SSMS that aren't on the keywords list (e.g. description) but it is the first time it has been pink, I believe.

    Any thoughts as to why?

    Normally I would use the manual as the definitive source, but the new colour has thrown me a little!
    George
    Home | Blog

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I can offer two guesses, but no solid answer:

    1. Since CROSS-PLATFORM is reserved in the ISO standard I'm going to guess that is why the SSMS editor has highlighted it.
    2. I've overheard some discussions that PLATFORM might be used for Azure to on-premises

    Hope that helps at least a bit.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Pink is usually a function, so I tried:
    Code:
    select platform()
    , and got a result. Not too sure what the result means, as I am getting the same result from some servers. I ran this on a few servers:
    Code:
    select platform(), serverproperty('ProductVersion'), serverproperty('ProductLevel'), serverproperty('Edition'), @@version
    , and got this, which is a pretty good spread, but does not really shed a lot of light on the meaning of the platform() function:

    Code:
    513	9.00.5069.00	SP4	Standard Edition		Microsoft SQL Server 2005 - 9.00.5069.00 (Intel X86) 
    	Aug 22 2012 16:01:52 
    	Copyright (c) 1988-2005 Microsoft Corporation
    	Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
    
    1029	12.0.4100.1	SP1	Enterprise Edition: (64-bit)	Microsoft SQL Server 2014 - 12.0.4100.1 (X64) 
    	Apr 20 2015 17:29:27 
    	Copyright (c) Microsoft Corporation
    	Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 <X64> (Build 9600: )
    
    517	10.0.5520.0	SP3	Standard Edition (64-bit)	Microsoft SQL Server 2008 (SP3) - 10.0.5520.0 (X64) 
    	Jul 11 2014 16:11:50 
    	Copyright (c) 1988-2008 Microsoft Corporation
    	Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (VM)
    
    517	10.50.4000.0	SP2	Standard Edition (64-bit)	Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64) 
    	Jun 28 2012 08:36:30 
    	Copyright (c) Microsoft Corporation
    	Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
    
    517	10.0.5520.0	SP3	Standard Edition (64-bit)	Microsoft SQL Server 2008 (SP3) - 10.0.5520.0 (X64) 
    	Jul 11 2014 16:11:50 
    	Copyright (c) 1988-2008 Microsoft Corporation
    	Standard Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2) (VM)

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quote Originally Posted by Pat Phelan View Post
    1. Since CROSS-PLATFORM is reserved in the ISO standard I'm going to guess that is why the SSMS editor has highlighted it.
    I can't find "CROSS-PLATFORM" on the ISO list? Perhaps I am using an out of date resource...

    Quote Originally Posted by MCrowley View Post
    Pink is usually a function, so I tried:
    Code:
    select platform()
    , and got a result.
    Well spotted that man!
    After a little more digging the only additional information I can find is: "undocumented function for MS use only".



    Should I avoid using this as an object/column name?
    George
    Home | Blog

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    * bump *
    George
    Home | Blog

  6. #6
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    As a rule of thumb, if a word changes color when you finish typing it, don't use it as a column or object name. Most table and column names are hidden from the end users, anyway, so they should not complain all that much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •