Link to home
Start Free TrialLog in
Avatar of Prakash_Mishra
Prakash_Mishra

asked on

Sybase truncates charcaters in the column and data is case sensitive unlike SQL Server

I have couple of basic questions regarding Sybase.

If I have a column in Sybase of Varchar length of 10 characters and I insert more than 10 character then Sybase ASE automatically chops off (truncates) the character beyond 10. But MS SQL server does produce an error. I want Sybase to produce an error. Can you please let me know is there any global level setting I need to do in Sybase ASE. I am using 12.5.3 version of Sybase.


My another question is that Sybase is case sensitive when it comes to data search like suppose I want to search all the names with letter 'ABC' from employee table then I can write query like this

SELECT name from emp where name = 'abc' in SQL Server it will return me row with name "ABC" irrespective of passing lower case. But Sybase does not return value unless we specify "ABC" in where clause.

Since I am migrating to Sybase so I want Sybase to behave in same way. Is there any global level server setting I can do in Sybase. Like i said I am using Sybase ASE 12.5.3

Like always your help is very much appreciated..
Thank a lot.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Prakash_Mishra
Prakash_Mishra

ASKER

Thanks angeIII and thanks Joe.

I appreciate your prompt responses.

So there is no way I can string trucation at server level. That is not good.

Can anyone of you can tell me what is the command for changing Sort order from isql. I know I can do it from Sybase central but I need to automate it through isql while installing Sybase Server. By the same token if you can tell me how to change Character set from command line using isql utility. That will be great.

Thanks million to both of you.. Appreciate your help..
Sybase ships some specific tools for changing character sets and sort orders. In any of the UNIX versions it's called "sqlloc" (for Localisation"). In Windows it's part of Syconfig I think. The Install Guide for your platform will document it. Remember though if you're changing this for an existing server you have a lot of tasks ahead of you to make everything work! Again, the manuals document this.

Good luck!
You can set up a login trigger for each user that sets the string_rtruncation option on automatically everytime they log in.  Use SET EXPORT_OPTIONS ON in the trigger along with SET STRING_RTRUNCATION ON.


There is an open feature request for an sp_configure option to set the default for string truncation,
CR 296987.

-bret