OK good advice, thanks,
the query is
"select DISTINCT(mcmskey) from idmv_entry_simple B with(nolock) inner join idmv_vna M4 on B.mcmskey = M4.mskey where mcIDStore=%IDSID% and (M4.ATTRNAME = 'MX_DEPARTMENT' and M4.sval='KOREA')"
and when I run this in MS SQL Server Management Studio, it return error with msg
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'IDSID'.
Here the IDSID was defined as integer type.
So I changed the query changing mcIDStore=%IDSID% to mcIDStore=1
then it works and returned 8 values.
(if I check developer studio, my identity store looks have number 1 like "1/T1_IdentityStore". So I choose number 1)
Here, can you give me more advice?
dongsu