How can you do a select in on more than 2100 values?
SELECT sub_acct_no, ...
FROM dbo.Closed_ORDER
WHERE o
First load the values into XML
#xmlformat(ord_no)#'>
'>
Then use the xml in the sql query
DECLARE @xmlOrd_no xml =
DECLARE @tblOrd_no TABLE (ID varchar(20))
INSERT INTO @tblOrd_no
SELECT tbl.Col.value('.', 'varchar(20)')
FROM @xmlOrd_no.nodes('/ul/li') tbl(Col)
SELECT sub_acct_no, ...
FROM dbo.Closed_ORDER
WHERE ord_no IN (SELECT ID FROM @tblOrd_no)
You can also do a dump of the XML and it is properly formatted in HTML
#strResult#