Select E.KeyBatchClass, (Case When E.InternalTest='False' Then (Select BC.ClassName from BachClasses BC where B.Key_Batch=BC.Key_Batch) When E.InternalTest='True' Then (Select BC.ClassName from BachClasses BC where B.Key_Batch=7) --My this line returns more than 1 rows and i need the same, result. i.e want multiple rows When E.InteralTest=True End) as Batch_Class from Exam E,Batch B where E.keyBatch=B.key_Batch and E.KeyExam=3 and E.keyBatch=7
Select E.KeyBatchClass, BC.ClassName as Batch_Class from Exam E Join Batch B On E.keyBatch=B.key_Batch JOIN BachClasses On B.Key_Batch= (Case When E.InternalTest='False' Then BC.Key_Batch else 7 end) where E.KeyExam=3 and E.keyBatch=7
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)