Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2445
  • Last Modified:

Column Name case-sensitivity issue

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
jsprenk55
Asked:
jsprenk55
4 Solutions
 
namasi_navaretnamCommented:
This option needs to be specified when creating the database. You can create an instance of SQL server that is not case sensitive.
0
 
namasi_navaretnamCommented:
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
 
doryllisCommented:
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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
AndrewNovickCommented:
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
 
LowfatspreadCommented:
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
 
Tacobell777Commented:
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
 
jsprenk55Author Commented:
We ended up modifying selects to accommodate case issue.  Thanks for all your help.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now