Friday, 8 April 2016

RE: !!***SPAM***!! Re: [firebird-support] Firebird V3RC2 Primary Key question

 

Thanks for instructions. It does work.

Is there a way to use created case insensitive collation as database wide default? It would be easier for me not to specify collation for each and every index definition.

Thanks.

From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Sent: Friday, April 8, 2016 10:36 AM
To: firebird-support@yahoogroups.com
Subject: !!***SPAM***!! Re: [firebird-support] Firebird V3RC2 Primary Key question

On 7-4-2016 23:01, Ertan Küçükoğlu ertan.kucukoglu@1nar.com.tr
[firebird-support] wrote:
> Would you be so kind to provide an example SQL which shows how to do
> primary key with a case insensitive collation?

1. Register the WIN1254_UNICODE collation (it is defined in fbintl.conf,
but not included by default in Firebird):

create collation WIN1254_UNICODE for win1254

2. Derive a case insensitive collation from WIN1254_UNICODE:

create collation win1254_ci for win1254 from win1254_unicode case
insensitive

3. Create table

create table win1254test (
stringkey varchar(30) character set win1254 primary key collate
win1254_ci
)

4. Test it:

INSERT INTO win1254test(stringkey) VALUES('EK'); -- succeeds
INSERT INTO win1254test(stringkey) VALUES('ek'); -- fails
INSERT INTO win1254test(stringkey) VALUES('Ek'); -- fails
INSERT INTO win1254test(stringkey) VALUES('eK'); -- fails

I hope this helps,
Mark
--
Mark Rotteveel

[Non-text portions of this message have been removed]

__._,_.___

Posted by: =?utf-8?B?RXJ0YW4gS8O8w6fDvGtvxJ9sdQ==?= <ertan.kucukoglu@1nar.com.tr>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? The Yahoo Mail app is fast, beautiful and intuitive. Try it today!

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.

__,_._,___

No comments:

Post a Comment