Solved

Column Name case-sensitivity issue

Posted on 2003-10-30
7
2,419 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
7 Comments
 
LVL 15

Assisted Solution

by:namasi_navaretnam
namasi_navaretnam earned 50 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 50 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 1

Assisted Solution

by:AndrewNovick
AndrewNovick earned 50 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 50 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now