Hi
I have 2 tables country and state that has the following data.
country
=======
code value
---------------
in india
us usa
uk britain
state
code value
----------------
ca california
mi michigan
io iowa
i am getting the value for code (tempcode) from a different source. If tempcode is one among the codes that is in state table then i want to retrive the country.code as 'US' else i want to retrieve the value as it is. there is no link between the 2 tables.
Please help to provide with a sql query on this. Can we use decode function in this case.
Please reply as this is urgent.