Appreciate if someone can do a quick QA on this code and let me know if I am on the right track.
the SQL belongs to a stored procedue of a large Web system. I do not have the development enviorenment for the entire system, but need a change to one of the stored prcedures so its kind of very hard to do full testing.
the existing code extracts a hard coded string (DCode) depending on the Descr in the ClassMaster table. But new requirements are DCode can change. So we built a new table with a link to ClassMaster ( DGCodes ). The new table cotains the DCode that the user can edit.
I just want to make sure the new SQL code does teh same job as before.
here is the table structure
ClassId Descr DCode
000000001G00000001YN A 1
0000000033000000001M B 2
00000000880000000014 C 3
here is the Existing code
When 'A' then '1'
When 'B' then '2'
When 'C' then '3'
end as DCode
from ClassMaster c join PartMain im on c.ClassId = im.ClassId
here is the new code
from DGCodes join join PartMain im on im.ClassId = DGCodes.ClassId