Column Name Case Sentive

  • Hi, im Matias from Argentina,

    i need to know if exist a way to change the collation of the TABLE column name

    EXAMPLE: Table "table1" contains two columns: "column1" and "COLUMN1" and both need to be different.

    Please help.

  • Yes, but database must have Case Sensitive collation.

  • Oh, entire database 🙁

    i only need this for a single table variable, is there a way to do?

  • The object gets its collation from the database, so the database where you are declaring the table variable must be in a case sensitive collation.

  • I have entire database in other collation mode,

    only need to use this TABLE VARIABLE with column names case sensitive, only for this table,

    is a way to do this? Thanks

  • Why cant you just name the columns differently? Especially if its a temporary thing like a table variable.

    _________________________________________________________________________
    SSC Guide to Posting and Best Practices

  • Is a lot to explan but i have build a funcion to convert XML to TABLE, and represent by column names the alias names of the XML format, and in xml have columns with same name (but case sensitive), then i need to represent exactly in the column

    example

    <cols>

    <i name="A"/>

    <i name="a"/>

    </cols>

    <rows>

    <i a="John" A="Male" />

    </rows>

  • That makes sense, and I can see why you're having problems.

    Is it possible to get the Columns renamed in the XML source or is this a fixed definition?

    One thing you could do is create a staging database with Case sensitivity enabled, preload the XML there then sit a view over the top with Proper column names.

    _________________________________________________________________________
    SSC Guide to Posting and Best Practices

  • The xml is fixed definition.

    I think that is a solution but is dirty code.

    The only way then is to obtain a column with other name like "A0" instead "a", ugly but is the only way i think

Viewing 9 posts - 1 through 8 (of 8 total)

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