Welcome to Dream.In.Code
Become an Expert!

Join 137,388 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,141 people online right now. Registration is fast and FREE... Join Now!




ORA-00936

 
Reply to this topicStart new topic

ORA-00936, missing expression

straygrey
9 Oct, 2008 - 04:32 AM
Post #1

New D.I.C Head
*

Joined: 4 Oct, 2008
Posts: 7


My Contributions
The following SQL gives an ORA-00936: missing expression error when run
CODE

select     MemNumber,
        Turnover
from
(
        select mem_number MemNumber,
        sum(trans_turnover) Turnover
from members
join transact
on mem_number = trans_code
where Trans_date between '&Start' and '&End'
and mem_barred = 0
group by     mem_number
        order by turnover desc
)
where rownum <=200
/


Please tell me how I fix it.
User is offlineProfile CardPM
+Quote Post

Hary
RE: ORA-00936
10 Oct, 2008 - 01:52 AM
Post #2

D.I.C Head
**

Joined: 23 Sep, 2008
Posts: 205



Thanked: 15 times
My Contributions
Change the selections to:
CODE

        select mem_number AS MemNumber,
        sum(trans_turnover) AS Turnover

User is offlineProfile CardPM
+Quote Post

straygrey
RE: ORA-00936
10 Oct, 2008 - 03:06 AM
Post #3

New D.I.C Head
*

Joined: 4 Oct, 2008
Posts: 7


My Contributions
Thanks for the suggestion but that did not fix the problem. I still get the ORA-00936 error.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/5/08 02:19AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month