You have made few points Abhay. True.

But reading between the lines.

If tempcode is one among the codes that is in state table then i want to retrive the country.code as 'US'
He doesn't say that tempcode will not contain the values of country code. He has just mentioned that
there is no link between the 2 tables.
I believe it is one of those applications(as we see on the internet)to select the state if you are residing in US etc., etc,.

I believe he wants to select the Country as US if the value in Tempcode finds a match in State table or the equivalent of the country code which the Tempcode will carry.

You have assumed the design to be in fine granularity
ie., Bangalore, Chennai.. Melbourne, Manchester etc.,

In that case he would not have post this question at all

Would you agree?

- Nandu