I’m trying to do a query with a string array that is not a user entered array, I have defined the following type:
CREATE TYPE [dbo].[searchData] AS TABLE([searchInput] [nvarchar](max) NOT NULL
In a stored procedure I fill the @tempTable variable of table type [searchData] with a WHILE, but when
SELECT DISTINCT Column1, Column2, Column3, Column1Tabla2
FROM Tabla1 INNER JOIN Tabla2 ON DT_Tabla1.Column2 = Tabla2.Column1Tabla2
WHERE Column1 IN (select * from @tempTable)
select * from @tempTable --Devuelve todos los valores que hay en la tabla
only return the last value of [searchData].
This does not really make sense, and I don’t believe it will compile:
Perhaps you meant: