Reputation: 3
I am having the error below when trying to convert the field character to Uppercase when the length of the country name is greater than the length of the currency name.
ORA-00923: FROM keyword not found where expected
00923. 00000 - "FROM keyword not found where expected"
This is the SQL statement I used:
select
countryname.country, countryname.currencycode, currency.currencyname
case(
when length(countryname.country)> length (currency.currencyname)
then UCASE(countryname.country)
else
LCASE(countryname.country)
)end
from currency,countryname
where currency.currencycode=COUNTRYNAME.currencycode;
Upvotes: 0
Views: 67
Reputation:
Try adding a comma after the first currencyname
, and removing the brackets after the case
keyword:
select
countryname.country, countryname.currencycode, currency.currencyname,
case
when length(countryname.country)> length (currency.currencyname)
then UCASE(countryname.country)
else
LCASE(countryname.country)
end
from currency,countryname
where currency.currencycode=COUNTRYNAME.currencycode;
Upvotes: 2
Reputation: 309
Im not familiar with oracle, but the error seems to specify a different issue.
Could it be that you just forgot to put an "," after currencyname?
Upvotes: 0