Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle SQL DISTINCT HELP!!
Gary C. Greenwood <ggreenwood_at_ggtrains.com> schrieb in im Newsbeitrag:
rsde4mruj7122_at_corp.supernews.com...
> I'm coming from Centura SQLBase to Oracle the folling SQL is giving a
> ORA-01791 not a SELECT ed expression. I'd appreciate any help in fixing
it.
>
> SELECT DISTINCT REQUIREMENT.PART_ID, PART.ID
> FROM PART, WORK_ORDER, REQUIREMENT REQUIREMENT.PART_ID AND PART.ID
> INTO :sPn, :sPpn
> WHERE PART.ID = WORK_ORDER.PART_ID
> AND WORK_ORDER.BASE_ID = REQUIREMENT.WORKORDER_BASE_ID
> AND WORK_ORDER.LOT_ID = REQUIREMENT.WORKORDER_LOT_ID
> AND WORK_ORDER.TYPE = REQUIREMENT.WORKORDER_TYPE
> AND (PART.FABRICATED = \'Y\' AND PART.LOW_LEVEL_CODE = :nX)
> ORDER BY TYPE, PART.ID
>
look at the order by clause. Type is not a part of your select statement.
regards
Nicolas
Received on Fri Aug 27 1999 - 13:37:04 CDT