Reputation: 5602
I'm new to Sybase and I really find it annoying to write sql with appropriate case for table names and column names. For eg, if the table name is 'Employee' I can't query as,
select * from employee
Is there a way to change this behavior in Sybase?
I don't want to change the sort order or anything. I'm looking for a hack to bypass this issue.
Cheers!!
Upvotes: 0
Views: 2923
Reputation: 2378
As correctly pointed out in the other responses, this is a server-level configuration setting, which can be changed. However, what is not mentioned is that in ASE, case-sensitivity applies equally to identifiers as well as to data comparison. So if you configure a case-insensitive sort order as discussed here, the effect will also be that 'Johnson' is now consider equal to 'JOHNSON' - and this could potentially cause trouble in applications. In this sense, ASE is different from other databases where these two aspects of case-sensitivity are decoupled.
Upvotes: 1
Reputation: 6651
This behavior is a result of the servers sort order. This is a server level setting, not a database level setting, so the change will affect all databases on the server. Also if the database is in replication, all connected servers will need their sort order changed as well.
Changing the sort order will also require you to rebuild all the indexes in your system.
Here is the correct documentation on selecting or changing character sets and sort orders.
Configuring Character Sets, Sort Orders, and Languages
As mentioned in the comments, it will require DBA level access and the server will have to be restarted before changes will take affect.
Upvotes: 0