and SCREEN_MASTER.SCR_SCREEN in (
Case When @ScreenId is null
then
(select '0' + cast([ScreenNo] as char(2)) from [dbo].[ZZ_CinemaScreen_ScreenType] where [dbo].[ZZ_CinemaScreen_ScreenType].ScreenTypeId is null)
else
(select '0' + cast([ScreenNo] as char(2)) from [dbo].[ZZ_CinemaScreen_ScreenType] where [dbo].[ZZ_CinemaScreen_ScreenType].ScreenTypeId = @ScreenId)
end
I have a null or number - char situation
There problem is that it will write that the query returned more than one value.
As I can't figure it out (I think case returns a single value so I cannot use an in)
I'm trying to use a temp table at the moment.
But is there a better solution ?
Thanks.