select
CustomerName,City,State, MatchId,ServingSize, Fruit, DarkGreen,
[Red/Orange], Legumes, Starchy, Other, [Grains (oz)],
[Whole51%orgreater?], [Meat / Meat Alt], [Fluid Milk (cups)], Calories,
[Sodium (MG)], [Saturated Fat (grams)], [Trans Fat (grams)],
MeetsAllianceForAHealthierGenerationGuidelines, OtherNotes, Name,
WebsiteLinkToSource, Date
from
#FinalTempTable
Where
(
MatchId,ServingSize, Fruit, DarkGreen, [Red/Orange], Legumes, Starchy,
Other, [Grains (oz)], [Whole51%orgreater?], [Meat / Meat Alt], [Fluid Milk (cups)],
Calories, [Sodium (MG)], [Saturated Fat (grams)], [Trans Fat (grams)],
MeetsAllianceForAHealthierGenerationGuidelines, OtherNotes, Name,
WebsiteLinkToSource, Date
)
IN
(
Select
MatchId,ServingSize, Fruit, DarkGreen, [Red/Orange], Legumes,
Starchy, Other, [Grains (oz)], [Whole51%orgreater?], [Meat / Meat Alt],
[Fluid Milk (cups)],Calories, [Sodium (MG)], [Saturated Fat (grams)],
[Trans Fat (grams)], MeetsAllianceForAHealthierGenerationGuidelines,
OtherNotes, Name, WebsiteLinkToSource, Date
From
MealContributions
Where
MatchId IN (Select distinct MatchId from #FinalTempTable)
)
このクエリを使用していますが、次のエラーが発生します。
メッセージ 4145、レベル 15、状態 1、行 10 ',' の近くで、条件が予想されるコンテキストで指定された非ブール型の式。
#finaltemptable のすべての列と、MatchId が #finaltemptable の matchid と同じである食事の貢献の列のみが必要です