Subject | Re: [firebird-support] Re: First word after in alphabetical order |
---|---|
Author | Eric SIBERT |
Post date | 2005-08-27T08:00:32Z |
> You haven't mentioned whether you have any index(es) on Name thatI already have both ascending and descending indexes on NAME. And it
> could be used in these queries. If you have both an ascending index
> and a descending index on the Name field.
>
> Assuming BOTH these indexes are available, it should run in a few ms
don't run in few ms :-(
>I need also to mention that NAME is defined by :
> SELECT FIRST 11
> ID_NAME
> FROM NAMES
> WHERE NAME>='FISHE'
> ORDER BY NAME;
>
> SELECT FIRST 10
> ID_NAME
> FROM NAMES
> WHERE NAME<'FISHE'
> ORDER BY NAME DESC;
NAME CHAR(8) CHARACTER SET ASCII NOT NULL,
>Sure, I will merge results together but later.
> You may be able to use a union to collect the results together, but I
> don't know if it will like the two different order by statements, so
> maybe the following stored procedure would help.
Eric