Это мой запрос:знак вопроса в В заявлении
select top 6 Nr,'<a href=[url]?id=' + convert(varchar,Nr) + '&ch=TRA&channel=TRA>' + isnull(menutitle,title) + '</a>' as title
from vwActive
where NR IN (select nr from dbo.fn_RecurseChildren('4',0))
and parent not in (6985,54092,29,28,98086,97126)
and Nr not in (?)
and isnull(ShowFrom,AddDate) >=(getdate()-14)
and contentType<>7
and hiddenchild=0
and (Body NOT LIKE '' AND Body NOT LIKE '<P> </P>'
or Description NOT LIKE '' AND Description NOT LIKE '<P> </P>'
)
and nr not in(
select replace(ctspecificvar1,char(91)+'item'+char(93)+'=','') link
from vwactive
where hiddenchild=0 and parent=6985
and contenttype=7
and isnumeric(replace(ctspecificvar1,char(91)+'item'+char(93)+'=',''))=1
)
and nr not in (
select case when isnumeric(replace(ctspecificvar1, '[item]=', '')) = 1 then convert(int,replace(isnull(ctspecificvar1, 0), '[item]=', '')) else 0 end link
from vwActive
where contenttype=7 and hiddenchild=0 and parent=6985
)
, но я получаю сообщение об ошибке на это заявление:
and Nr not in (?)
Но если я опускаю это заявление, то этот запрос работает.
Но как дать работу запроса с утверждением:
и Nr не
Спасибо
Что вы ожидаете от 'IN (?)', Чтобы сделать для вас? –
Какое сообщение об ошибке вы получаете? –
Почему у вас есть эта строка в вашем запросе? –