TheNewbie81
Technical User
hi,
I have what i thought was a simple inner query ( new to SQL), i want to first return all records where the time is between a and b and then query the results to find num. i cant see whats wrong with it, any ideas?
I am getting an error which says ORA-00933: SQL command not properly ended. can't seem to figure out why it wont work, both queries work on their own. any tips or comments would be gratefully accepted
I have what i thought was a simple inner query ( new to SQL), i want to first return all records where the time is between a and b and then query the results to find num. i cant see whats wrong with it, any ideas?
Code:
SELECT NUM FROM CC_SESSION_TABLE
WHERE SESSION_NUM = 'ggsn9811;107;125;6668' and REQUEST_NUM ='0'IN ( SELECT NUM FROM CC_SESSION_TABLE
WHERE LAST_EVENT_TIMESTAMP
BETWEEN TO_DATE('20100812184200','yyyy-mm-dd hh24:mi:ss') AND TO_DATE('20100812184600','yyyy-mm-dd hh24:mi:ss'));
I am getting an error which says ORA-00933: SQL command not properly ended. can't seem to figure out why it wont work, both queries work on their own. any tips or comments would be gratefully accepted