Subject | Re: [firebird-support] Invalid request BLR at offset XXXX in firebird 1.0x not in 1.5 |
---|---|
Author | Ivan Prenosil |
Post date | 2004-05-03T14:06:52Z |
> It work fine unfortunately it is slower !Are you sure the speed does not depend on something else, e.g. cache ?
Anyway, there are some other possibilities:
- do concatenation on the client (where formatting belongs anyway)
- use UDF, either write your own specialized, or just standard this way:
SELECT DISTINCT t.*, ltrim(a) || substrlen(' ' || a, 1, 1) || ltrim(b)
FROM t;
- you can ask for filtering distinct rows by using UNION (without ALL), e.g.
SELECT TAB.*, (<subselect>) FROM TAB
UNION
SELECT TAB.*, CAST('' AS VARCHAR(...)) FROM TAB WHERE pk IS NULL;
Ivan
http://www.volny.cz/iprenosil/interbase/
----- Original Message -----
From: "Fabrice Vendé" <fabrice@...>
To: <firebird-support@yahoogroups.com>
Sent: Monday, May 03, 2004 3:11 PM
Subject: Re: [firebird-support] Invalid request BLR at offset XXXX in firebird 1.0x not in 1.5
> Thank you for the answer,
>
> It work fine unfortunately it is slower !
>
>
> >This is a known bug, DISTINCT on sub-select in select list.
> >
> >As workaround you could use a LEFT JOIN instead :
> >
> >SELECT
> > DISTINCT
> > Q2.*,
> > cfl.FIRSTLASTNAME AS R_FIRSTLASTNAME
> >FROM
> > CUSTOMER Q2
> > LEFT JOIN CONCAT_FIRSTLASTNAME(Q2.FIRSTNAME ,Q2.LASTNAME) cfl ON (1 = 1)
> >
> >
> >Regards,
> >Arno Brinkman
> >ABVisie
> >
> >
>
> Best regard,
>
> --
>
> Fabrice Vendé
> fabrice@...
> -
> SARL I N F O C O B
> Développement, formation, matériel, logiciel
> http://www.infocob.com