If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Help With Date

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-01-03, 19:43
compgirl compgirl is offline
Registered User
 
Join Date: Oct 2003
Posts: 1
Help With Date

Hi people, i am trying to get this done:

select e.lname
from employee e, department d
where e.ssn = d.essn and months_between(sysdate,e.bdate) <= all(select months_between(sysdate,e2.bdate)
from employee e2,department d2
where e2.ssn = d2.mgrssn);

and this is the error it gives me:
4* where e2.ssn = d2.mgrssn)
where e.ssn = d.essn and months_between(sysdate,e.bdate) <= all(select months_between(sysdate, e2.bdate) from employee e2, department d2
*
ERROR at line 3:
ORA-00904: invalid column name

could someone tell me why?
thankyou soo much
Reply With Quote
  #2 (permalink)  
Old 10-02-03, 03:14
achje achje is offline
Registered User
 
Join Date: Oct 2003
Location: Belgium
Posts: 2
At the end of your third line you put "(sysdate,e2.bdate)"; only you call upon e2 on the next line: from employee e2 ...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On