| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> group by / columns
Hi,
I am migrating all SQL statements from SQLBase to Oracle (8.0.5.)
In SQLBase it was possible to use the column numbers in group by and order
by statements.
Example
Select @datevalue(...) As TheDate,
@left(...) As Tframe,
count(*) As Amount,
(...)
From (...)
where (...)
group by 2,1
order by 2,1;
This doesn't work with Oracle. I can use the assigned column names in the order by clause, but it seems that I have to use the full expression in the group by clause. In Oracle it would look like this:
group by substr(...),to_date(...)
order by Tframe,TheDate;
Is there any other way I can refer to to expressions in the group by clause ?
TIA, Sammy Received on Thu Jan 25 2001 - 11:35:57 CST
![]() |
![]() |