I have a select statement where in it might return more than one value. so I would like to store the selected values in a table kind of array since there is no concept of array in sql and also use the same stored values. My select query is as follows:
if exists(
Select StartDate,EndDate
FROM Reservations1
where (DateAdd(day,0,StartDate) >= @StartDate)
and (DateAdd(day,0,EndDate) <= @EndDate)
and Requestid in
(Select RequestId from RequestModelMap1
where ModelSerialNumber=@ModelSerialNumber)
)
If it returns some values then i want to store it.
INclause is effectively specifying an array of values (RequestIDs) as an argument...