Hi Lynn,
A Business Analyst gave me a requirement to create a new table when in fact there already is one.
I commented the sub query replaced it with a CASE Statement.
This is much simpler.
I learned from this post and if I have to do something like that I will do it again. again I will save it for future use.
--(Select ActionRatingID from ActionRating where ExperianRatingText = Action) as ActionRatingID,
CASE
WHEN [Experian Score] BETWEEN 0 and 49 THEN
5
WHEN [Experian Score] BETWEEN 50 AND 79 THEN
3
WHEN [Experian Score] BETWEEN 80 and 100 THEN
1
END AS ActionRatingID ,
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/