954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

[ERROR] FROM keyword not found

i have a query is to lookup CREDIT_CARD table using CREDIT_CARD_ID and get the MIN_REPAY_AMT. if SUM(AMOUNT_DEPOSITED) < MIN_REPAY_AMT for that month Then populate 1000 else 0 i have attempted the query below kindly help me out

and i am getting the following error.
Error:

ERROR at line 2:
ORA-00923: FROM keyword not found where expected

Code:

select a.CREDIT_CARD_ID,a.MIN_REPAY_AMT,to_char(DATE_OF_TRANS,'month') 
case when
a.CREDIT_CARD_ID = b.CREDIT_CARD_ID
then
case when
sum(CREDIT_CARD_DEPOSIT.AMOUNT_DEPOSITED)< a.MIN_REPAY_AMT
Then
1000
else
0 
end repay_charges from credit_card a join  CREDIT_CARD_WITHDRAW b on a.CREDIT_CARD_ID = b.CREDIT_CARD_ID;
daneuchar
Light Poster
30 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

Well... First of all, you are missing the comma after your date column.

hfx642
Posting Pro
515 posts since Nov 2009
Reputation Points: 248
Solved Threads: 105
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: