‎2007 Jan 04 12:00 PM
HI champions,
i m facing problem in this select statement........its giving error...plz help me.
here im giving the complete scenario....
REPORT ZW.
tablEs:sbook.
select carrid connid count( * ) SUM( LUGGWEIGHT ) INTO (CARRID,CONNID,COUNT,SUM_WEIGHT) FROM SBOOK WHERE CARRID = 'LH' GROUP BY CARRID CONNID HAVING SUM( LUGGWEIGHT ) > 25.
WRITE:/ CARRID,CONNID,COUNT,SUM_WEIGHT.
ENDSELECT.
‎2007 Jan 04 12:41 PM
Hi ravi,
use need to use the table name as qualifier, here is the corrected code
tablEs: sbook.
data: count type i,
sum_weight type i.
select carrid connid count( * ) SUM( LUGGWEIGHT )
FROM SBOOK
INTO (SBOOK-CARRID, SBOOK-CONNID, COUNT, SUM_WEIGHT)
WHERE CARRID = 'LH'
GROUP BY CARRID CONNID
HAVING SUM( LUGGWEIGHT ) > 25.
WRITE:/ SBOOK-CARRID, SBOOK-CONNID, COUNT, SUM_WEIGHT.
ENDSELECT.
Thanks
Srini
‎2007 Jan 04 12:21 PM
Hello Ravi,
Can you also please give the text of the error ?
Avisesh.
‎2007 Jan 04 12:41 PM
Hi ravi,
use need to use the table name as qualifier, here is the corrected code
tablEs: sbook.
data: count type i,
sum_weight type i.
select carrid connid count( * ) SUM( LUGGWEIGHT )
FROM SBOOK
INTO (SBOOK-CARRID, SBOOK-CONNID, COUNT, SUM_WEIGHT)
WHERE CARRID = 'LH'
GROUP BY CARRID CONNID
HAVING SUM( LUGGWEIGHT ) > 25.
WRITE:/ SBOOK-CARRID, SBOOK-CONNID, COUNT, SUM_WEIGHT.
ENDSELECT.
Thanks
Srini