Home » SQL & PL/SQL » SQL & PL/SQL » WITH Clause Help
WITH Clause Help [message #293031] Thu, 10 January 2008 11:43 Go to next message
kam123
Messages: 13
Registered: January 2008
Junior Member
Hi Everyone,

Here is my query, when I run this query in TOAD I am getting error as "missing select keyword". Please suggest.

WITH eelist AS
(
SELECT al.process_level,al.deptname,al.department,al.emp_status,al.fte_total,al.employee
    FROM lrsuser.v_associatelist al
    WHERE 
      al.group_name='G:ACTIVE'
      AND 
      al.emp_status IN     ('CF','E9','EF','N9','NF','CA','EA','NA','CB','EB','NB')
)


Thank You!
Re: WITH Clause Help [message #293033 is a reply to message #293031] Thu, 10 January 2008 11:51 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
What do you want to achieve from this?
When you want to use similar queries more than once, you can use WITH.

By
Vamsi
Re: WITH Clause Help [message #293035 is a reply to message #293031] Thu, 10 January 2008 12:01 Go to previous messageGo to next message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
WITH clause or subquery subfactoring clause is part of SELECT statement that must follow this WITH clause, see syntax diagram http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#i2126435.
In what you posted you just have the WITH clause without the SELECT statement that referenced it.
So the error "missing SELECT keyword".

Regards
Michel

[Updated on: Thu, 10 January 2008 12:03]

Report message to a moderator

Re: WITH Clause Help [message #293355 is a reply to message #293035] Fri, 11 January 2008 14:32 Go to previous message
kam123
Messages: 13
Registered: January 2008
Junior Member
Thanks for your help!
Previous Topic: Is Primary Key Function
Next Topic: Complex String Query
Goto Forum:
  


Current Time: Fri Dec 02 20:40:01 CST 2016

Total time taken to generate the page: 0.10684 seconds