Subject RE: [ib-support] firebird1.5 group by question
Author Robert DiFalco
You are ordering on a field that is not in the list of your result set
values.

-----Original Message-----
From: Rich Ding [mailto:ags@...]
Sent: Tuesday, April 29, 2003 9:22 PM
To: ib-support@yahoogroups.com
Subject: [ib-support] firebird1.5 group by question


Hello,
I have a question ,Please help


TWO TABLES:
/****************************/
CREATE TABLE ORDERCOLOR (
ORDERID INTEGER NOT NULL,
COLORID INTEGER NOT NULL,
FIXKIND SMALLINT DEFAULT 0 NOT NULL,
SIZELEVEL VARCHAR (20),
WORKINGORDER SMALLINT) ;

ALTER TABLE ORDERCOLOR ADD PRIMARY KEY (ORDERID, COLORID,
FIXKIND,
SIZELEVEL);

/****************************/

CREATE TABLE COLOR (
COLORID INTEGER NOT NULL,
COLORNO VARCHAR(20) NOT NULL,
NAME VARCHAR(40) NOT NULL,
COLORINDEX INTEGER DEFAULT 0 NOT NULL);

ALTER TABLE COLOR ADD PRIMARY KEY (COLORID);
ALTER TABLE COLOR ADD UNIQUE (COLORNO);

/****************************/


this query on firebird1.5 result a error :

Select o.ColorId,max(c.name) colorname , max(c.colorno)
colorno
from OrderColor O
join color c on (o.colorid = c.colorid)
group by o.colorid
order by o.workingorder


Dynamic SQL Error.
SQL error code = -104.
invalid column reference.


firebird 1.02 no error .


this query on firebird1.5 no error


Select o.ColorId,max(c.name) colorname , max(c.colorno)
colorno
from OrderColor O
join color c on (o.colorid = c.colorid)
group by o.colorid ,o.workingorder
order by o.workingorder



what's wrong?


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



Yahoo! Groups Sponsor

<http://rd.yahoo.com/M=229633.3212141.4526654.2595810/D=egroupweb/S=1705
115386:HM/A=1556779/R=0/*http://shop.store.yahoo.com/cgi-bin/clink?ftd2+
shopping:dmad/M=229633.3212141.4526654.2595810/D=egroupweb/S=1705115386:
HM/A=1556779/R=1/1051676254+http://us.rmi.yahoo.com/rmi/http://www.ftd.c
om/rmi-framed-url/http://www.ftd.com/yahoo36>

<http://us.adserver.yahoo.com/l?M=229633.3212141.4526654.2595810/D=egrou
pmail/S=:HM/A=1556779/rand=269225060>

To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .




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