Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Column Name case-sensitivity issue

Posted on 2003-10-30
7
Medium Priority
?
2,440 Views
Last Modified: 2009-01-10
It is a long story, but I need a way to execute an INSERT INTO command without SQL Server being case-sensitive to the column names.  Is there a way to do this?  The column names that I am using in the INSERT are of the wrong case and I am getting "Invalid Column Name" errors because of this.  

Thanks for any help.
0
Comment
Question by:jsprenk55
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 15

Assisted Solution

by:namasi_navaretnam
namasi_navaretnam earned 150 total points
ID: 9652904
This option needs to be specified when creating the database. You can create an instance of SQL server that is not case sensitive.
0
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 9652915
SEE STEP 6 to see how this can be done.


How to create a case-sensitive instance of SQL Server 2000 (Setup)
To create a case-sensitive instance of SQL Server 2000

Run SQL Server Setup to install SQL Server 2000 Components, select Install Database Server, and then click Next at the Welcome screen of the SQL Server Installation Wizard.


In Computer Name dialog box, Local Computer is the default option and the local computer name appears in the edit box. Click Next.


In the Installation Selection dialog box, click click Create a new instance of SQL Server, or install Client Tools, and then click Next.


Follow the directions on the User Information and related screens.


In the Installation Definition dialog box, click Server and Client Tools, and then click Next.


In the Instance Name dialog box:
To create a case-sensitive default instance, accept the Default check box and click Next.


To create a case-sensitive named instance, clear the Default check box and type an instance name.
In the Setup Type dialog box, click Custom, and click Next.


In the Select Components, Services Accounts, and Authentication Mode dialog boxes, change or accept the default settings, and then click Next.


In the Collation Settings dialog box, you have two options:
To make a Windows Locale collation case-sensitive, select Collation designator and then select the correct collation designator from the list. Clear the Binary check box, and then select the Case-sensitive check box.


To make a SQL collation case-sensitive, select SQL Collations, and then select the correct collation name.
For more information about collation options, click Help. When you finish setting the options, click Next.

In subsequent dialog boxes, change or accept the default settings, and then click Next.


When you are finished specifying options, click Next in the Start Copying Files dialog box.


In the Choose Licensing Mode dialog box, make selections according to your license agreement, and click Continue to begin the installation.
0
 
LVL 2

Accepted Solution

by:
doryllis earned 150 total points
ID: 9653362
The upshot of what namasi_navaretnam has said is that either you recreate the database as case insensitive and move everything over or you fix your Insert statement to be correctly cased.

Good luck,
Dory
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 1

Assisted Solution

by:AndrewNovick
AndrewNovick earned 150 total points
ID: 9653746
Hi

If you can change the name of the table in the insert statement, you could create an updatable view with the names in upper case.  But, if you can't change the table name, I think that you'll have to change either the column names in the insert or the case sensitivity of the server as previously stated.

Regards,
Andy

Novick Software
www.NovickSoftware.com
Home of the free T-SQL UDF Of the Week Newsletter
0
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 9654095
Hi jsprenk55,

sorry why is this a problem?
what do you want to do?
show us the query and we can re-write it!
we can even generate it using the correct case probably?

an please maintain your open questions...
what is it you actually want..4 open questions:
10/30/03 http://www.experts-exchange.com/Q_20783394.html "Column Name case-sensitivity issue"
10/30/03 http://www.experts-exchange.com/Q_20783318.html "GetColumnNames() is returning all upperc..."
07/31/03 http://www.experts-exchange.com/Q_20696004.html "Is there a way to clear the undo buffer?"
02/11/03 http://www.experts-exchange.com/Q_20509655.html "Using dates in SELECT with Microsoft Acc..."
 

Cheers!
0
 
LVL 17

Assisted Solution

by:Tacobell777
Tacobell777 earned 150 total points
ID: 9654486
Isn't there a way to say to SQL server at run time not to be case sensitive? I thought there was, by setting the Collation?
0
 

Author Comment

by:jsprenk55
ID: 9697013
We ended up modifying selects to accommodate case issue.  Thanks for all your help.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question