Case Insensitive

  • I am Using SqlServer2000,  I have query any table that in UpperCase Only, But i would like to query Any table in both upper case  as well as lowercase. In this what i should do ?

    (if i use lowercase is shows table does not exist )

     

  • Right-click on the server and click properties.  If you see the last 2 sets are like CS_AS or CS_AI then your server is CaSe SenSitive.  Only way of getting around this cleanly (That I know of) is to re-install and make sure you select Case Insensitive.

    Unfortunately, this may violate your companies business rules (I have run into this...)

     



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • The other way is to use a query like this..

    select * from yourtable where yourcolumn collate sql_latin1_general_cp1_ci_as = 'columnvalue'

    That will turn off case sensitivity when running the query.

  • Hi

    Thanks for Reply

    select * from yourtable where yourcolumn collate sql_latin1_general_cp1_ci_as = 'columnvalue'

    i run the above query i get the following error

    Incorrect syntax near 'collate'

     

    Prakash

  • You don't have to do a full reinstall. You can run rebuildm. This will allow you to select a new collation. However, it does replace master, msdb, and model. You'll have to restore msdb from backup if you have SQL Agent jobs and DTS packages and you'll need to recreate logins (better to export them before running rebuildm). But it saves a little time.

    K. Brian Kelley
    @kbriankelley

  • Show me your query.

Viewing 6 posts - 1 through 5 (of 5 total)

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