次のクエリを実行しようとしていますがNull
、集計またはその他のSET
操作によって値が削除されるという警告が表示されます。
select
s.CurrentDate,
s.game_id,
s.Searchstring,
sm.type_of_game,
case when(count(t.game_id)>0) then 'Y' else 'N' end as scorestatus,
case when(count(i.game_id)>0) then 'Y' else 'N' end as scorestatusindividual,
sm.image_path,g.datetime,'' as score_keeper
from dbo.Search s with(nolock)
left outer join dbo.TeamGameResult t with(nolock) on s.game_id = t.game_id
left outer join dbo.IndividualGameResult i with(nolock) on i.game_id = s.game_id
join dbo.Game g with(nolock) on g.game_id=s.game_id
join dbo.AdditionalDetails ad on ad.AdditionalDetails_id = g.AdditionalDetails_id
join dbo.SportMaster sm with(nolock) on sm.SportsMaster_id = ad.SportsMaster_id
where (( Searchstring+' '+ convert(nvarchar(500),s.CurrentDate,101) Like '%01/15/2013%'
and Searchstring+' '+ convert(nvarchar(500),s.CurrentDate,101) Like '%Soccer%'))
and convert(varchar(10),g.datetime,101) in ('01/15/2013','01/14/2013')
group by s.game_id,
s.Searchstring,
sm.type_of_game,
s.CurrentDate,
sm.image_path,
g.datetime
order by g.datetime desc