sql - question mark in IN statement -


this query:

select top 6 nr,'<a href=[url]?id=' + convert(varchar,nr) + '&ch=tra&channel=tra>' + isnull(menutitle,title) + '</a>'    title              vwactive              nr in  (select nr dbo.fn_recursechildren('4',0))               , parent not in (6985,54092,29,28,98086,97126)    , nr not in (?)                            , isnull(showfrom,adddate) >=(getdate()-14)              , contenttype<>7               , hiddenchild=0  , (body not '' , body not '<p>&nbsp;</p>'                    or description not '' , description not '<p>&nbsp;</p>'              )   , nr not in(                select replace(ctspecificvar1,char(91)+'item'+char(93)+'=','') link                vwactive                hiddenchild=0  , parent=6985                , contenttype=7                , isnumeric(replace(ctspecificvar1,char(91)+'item'+char(93)+'=',''))=1              )   , nr not in (                  select case when isnumeric(replace(ctspecificvar1, '[item]=', '')) = 1 convert(int,replace(isnull(ctspecificvar1, 0), '[item]=', '')) else 0 end link                  vwactive                  contenttype=7 , hiddenchild=0 , parent=6985               ) 

but error on statement:

and nr not in (?) 

but if omit statement query works.

but how let query work statement:

and nr not in (?)

thank you

the question mark supposed filled parameters, i.e. replaced list of numbers supposed excluded query.

so if don't care, delete line (or comment out using '--').

if care, put nr values in there want exclude.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -