Order By query [message #375038] |
Fri, 20 July 2001 05:56 |
Rdamle
Messages: 4 Registered: July 2001
|
Junior Member |
|
|
I am running query like this
select * from
(
select prod_id,usoc from product
order by prod_id
)
where region_Cd like 'MB'
I get error 'missing right parenthesis at' and cursor is on word order. What is wrong here?
|
|
|
Re: Order By query [message #375040 is a reply to message #375038] |
Fri, 20 July 2001 06:50 |
Matthew
Messages: 20 Registered: July 2001
|
Junior Member |
|
|
Unfortunately,
you cannot have an order by clause in a subquery.
You would have to do something like:
select * from
(
select prod_id,usoc from product
)
order by prod_id
where region_Cd like 'MB'
I don't know where you are getting your region_Cd field from, but they will have to be added in, also, for the where clause to work.
|
|
|
|
|