somthing like this ]Create Table #RateList (Country varchar(10),Rate1 Money,Rate2 Money,Rate3 Money)Insert #RateList Select 'Ind',1000.0,1200.0,1250.0 Union All Select 'UK',1200.0,1500.0,1750.0 Union All Select 'AUS',1500.0,1800.0,2050.0 Union All Select 'UAE',1800.0,2100.0,2250.0 Select * from #RateListDeclare @CountryCOde Varchar(10)Set @CountryCode = 'UAE'Declare @RatingID Varchar(10)Set @RatingID = 'Rate1'Declare @QryString Varchar(800)Set @QryString = 'Select Top 1 Country, ' + @RatingID + ' From #RateList Where Country = ''' + @CountryCode + ''''Exec (@QryString)Drop Table #RateList
If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them.