asked on
DECLARE @POSITIONS VARCHAR(100) = '''SLF'', ''SRF'''
select @POSITIONS as POSITIONS
SELECT
A.PositionCode
FROM TMPOSITION A
WHERE A.PositionCode IN ('SLF', 'SRF')
SELECT
A.PositionCode
FROM TMPOSITION A
WHERE A.PositionCode IN (@POSITIONS)
POSITIONS
----------------------------------------------------------------------------------------------------
'SLF', 'SRF'
(1 row(s) affected)
PositionCode
------------
SLF
SRF
(2 row(s) affected)
PositionCode
------------
(0 row(s) affected)
ASKER
ASKER
Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.
TRUSTED BY
ASKER
It does not work with your code.
Open in new window
Thank you.