Subject | Re: [firebird-support] Bug: Index on "Name" incorrectly indexes on "NAME" |
---|---|
Author | Martijn Tonies |
Post date | 2004-11-27T15:52:02Z |
Hello Raymond,
Tww... component.
With Firebird, "setting an index" doesn't mean anything.
All that being said, you will slap yourself in the head a couple
of times with field names like:
"Name" and NAME both in the same table.
If not, your boss should do that.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> The index on "Name" incorrectly indexes on "NAME". This was noticed byI doubt this has to do with Firebird, but has everything to do with the
> setting the index in a TwwKeyCombo with ShowAllIndexes = True, selecting
> the index IDX_Customer_Name, and searching incrementally on for "Je",
> which is not found and then, without changing the index, searching for
> "jo" *is* found.
Tww... component.
With Firebird, "setting an index" doesn't mean anything.
All that being said, you will slap yourself in the head a couple
of times with field names like:
"Name" and NAME both in the same table.
If not, your boss should do that.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> SET SQL DIALECT 3;
>
> SET NAMES ASCII;
>
> CREATE DOMAIN D_NAME_C AS
> VARCHAR(50) CHARACTER SET ISO8859_1
> NOT NULL
> COLLATE EN_US;
>
> CREATE TABLE "Customer" (
> ID D_GENERATOR /* D_GENERATOR = INTEGER NOT NULL */,
> "Name" D_NAME_C /* D_NAME_C = VARCHAR(50) NOT NULL */,
> NAME D_NAME /* D_NAME = VARCHAR(50) NOT NULL */,
> "Email" D_EMAIL /* D_EMAIL = VARCHAR(50) */
> );
>
> INSERT INTO "Customer" (ID, "Name", NAME, "Email") VALUES (1, 'Jahn 1',
> 'JAHN 1', NULL);
> REINSERT (2, 'JaHn 2', 'JAHN 2', NULL);
> REINSERT (3, 'James', 'JAMES', NULL);
> REINSERT (4, 'Jemis', 'JOAMIS', NULL);
>
> ALTER TABLE "Customer" ADD CONSTRAINT "PK_Customer" PRIMARY KEY (ID);
>
> CREATE UNIQUE INDEX "IDX_Customer_Name" ON "Customer" ("Name");
> CREATE UNIQUE INDEX "IDX_Customer_Name_Upper" ON "Customer" (NAME);