Subject | Re: [firebird-support] Fb/1.5 loop(?) |
---|---|
Author | Gary Benade |
Post date | 2004-06-16T07:07:14Z |
Not sure how you want to use the output, but would this not do the job?
select LAND || ' ' || count(*) || ' '
from TITLER
group by LAND
order by count(*) desc
Regards
Gary
select LAND || ' ' || count(*) || ' '
from TITLER
group by LAND
order by count(*) desc
Regards
Gary
----- Original Message -----
From: "Aage Johansen" <aagjohan@...>
To: <firebird-support@yahoogroups.com>
Sent: Tuesday, June 15, 2004 11:23 PM
Subject: [firebird-support] Fb/1.5 loop(?)
> Hi
>
> Using the table:
> CREATE TABLE TITLER (
> TNR INTEGER NOT NULL primary key
> , SLNR INTEGER
> , LAND CHAR( 3 )
> , SRT SMALLINT
> , TITTEL VARCHAR( 100 )
> , TITTEL_UC VARCHAR( 100 )
> , PRISER VARCHAR( 32 )
> , T_TYPE VARCHAR( 32 )
> );
> About 250.000 records.
>
> I want to make a nice list out of the LAND column, and the following works
fine
> select LAND, count(*), '
> '
> from TITLER
> group by LAND, 3
> order by 2 desc
> The 3rd field is a CR/LF.
> PLAN SORT (SORT ((TITLER NATURAL)))
> The export finishes in about 2 seconds.
>
> The output is ok, but I want to have a space between columns LAND and
"count".
> However, the following seems to send Fb/1.5 into never-ever land, using
99%
> of the CPU. Running Win2kPro. I gave it a couple of minutes before I
> killed it (querycide?).
> select LAND, ' ', count(*), '
> '
> from TITLER
> group by LAND, 2, 4
> order by 3 desc
> The PLAN is the same, of course.
> I'm running this from the export-pane in IB_SQL.
> I could observe the disk lights blinking, about 3 times/second.
>
> What is happening? Is this a bug? In IBO (IB_SQL) or in Fb?
>
>
> I tried a local connection and tcp/ip (with localhost). It was impossible
> to stop when I used the local connection (reboot was necessary), but with
> localhost it was just seconds after I stopped IB_SQL that the server
> returned to idle.
>
>
> --
> Aage J.
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
> ************************************************************
> Scanned by @lantic IS Virus Control Service
> This message was scanned for viruses and dangerous content.
> @lantic Internet Services (Pty) Ltd. - http://www.lantic.net
> eScan for Windows-based PCs - http://www.escan.co.za
>
> If you have received a message marked in the subject line
> as [SPAM] please note that according to our MailScanner,
> this message has all the attributes of Unsolicited
> Commercial Email (UCE). If the message has however been
> marked incorrectly, please send a query to abuse@...
> ************************************************************
>
>