I have a simple decode that works as shown below;
SELECT membership_type,
DECODE(membership_type, 'Gold', 'First',
'Silver', 'Second',
'Bronze', 'Third',
'Gateway') Result
FROM m_membership_type
What I am trying to do is simply output some columns from another table as well, so I want to output customer_id from my m_customer table, below is what I figured the code is;
SELECT membership_type, customer_id
DECODE(membership_type, 'Gold', 'First',
'Silver', 'Second',
'Bronze', 'Third',
'Gateway') Result
FROM m_membership_type, m_customer
But I get the: ORA-00923: FROM keyword not found where expected error?
SELECT membership_type,
DECODE(membership_type, 'Gold', 'First',
'Silver', 'Second',
'Bronze', 'Third',
'Gateway') Result
FROM m_membership_type
What I am trying to do is simply output some columns from another table as well, so I want to output customer_id from my m_customer table, below is what I figured the code is;
SELECT membership_type, customer_id
DECODE(membership_type, 'Gold', 'First',
'Silver', 'Second',
'Bronze', 'Third',
'Gateway') Result
FROM m_membership_type, m_customer
But I get the: ORA-00923: FROM keyword not found where expected error?