Am having a bit of a nightmare trying to get DATEDIFF() to work.
Im new to Oracle syntax as i'm transitioning from MSAccess
Have searched around the forum but not found anything which fixes it
Here is the code:
CREATE OR REPLACE VIEW
B.FIRST_NAME AS FIRST_NAME,
B.LAST_NAME AS LAST_NAME,
NVL(COUNT(T.TRADE_ID),0) AS NUMBER_OF_TRADES_LAST_7_DAYS
LEFT OUTER JOIN
DATEDIFF(DD,SYSDATE -7,SYSDATE ) = '7'
GROUP BY B.FIRST_NAME, B.LAST_NAME
ORDER BY NUMBER_OF_TRADES_LAST_7_DAYS DESC
If you need more information or a schema of the database just let me know.
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.