選択クエリから宣言された変数に値を格納したいのですが、ここでの問題は、選択クエリが複数の行を返すことです。以下の例を参照してください
select Col1
from Table1 where Col1 NOT IN (select Col1 from Table2)
and Col3 >=8
------------------
result
73
74
declare @temp1 int
declare @temp2 int
I essentially want @temp1 to hold 73 and @temp2 hold 74 and so fort...
これを達成する方法についてのアイデアは非常に役立ちます。さらに説明が必要な場合はお知らせください。
前もってありがとう、ガガン