Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Column Name Case Sentive Expand / Collapse
Author
Message
Posted Sunday, January 6, 2013 1:49 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, January 7, 2013 7:31 AM
Points: 5, Visits: 4
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.
Post #1403350
Posted Sunday, January 6, 2013 2:36 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 8:38 AM
Points: 223, Visits: 1,725
Yes, but database must have Case Sensitive collation.
Post #1403359
Posted Sunday, January 6, 2013 4:23 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, January 7, 2013 7:31 AM
Points: 5, Visits: 4
Oh, entire database
i only need this for a single table variable, is there a way to do?
Post #1403370
Posted Monday, January 7, 2013 1:23 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 2:20 AM
Points: 5,231, Visits: 5,106
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.



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1403448
Posted Monday, January 7, 2013 7:02 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, January 7, 2013 7:31 AM
Points: 5, Visits: 4
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
Post #1403583
Posted Monday, January 7, 2013 7:08 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 7:09 AM
Points: 878, Visits: 2,395
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
Post #1403585
Posted Monday, January 7, 2013 7:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, January 7, 2013 7:31 AM
Points: 5, Visits: 4
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>

Post #1403588
Posted Monday, January 7, 2013 7:30 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 7:09 AM
Points: 878, Visits: 2,395
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
Post #1403598
Posted Monday, January 7, 2013 7:33 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, January 7, 2013 7:31 AM
Points: 5, Visits: 4
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
Post #1403603
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse