I'm not sure if I really get this... If the same cOrderNumber exists already, wouldn't you try to update the existing row? Something like you'd do with MERGE?
But It might be something like this what you are looking for:
WHERE NOT EXISTS(SELECT 1 FROM dbo.tOrder
WHERE x.exist(N'/tOrder[cID/text()=sql:column("cOrderNumber")])')=1)
(Untested air code)
This looks if there is any record within tOrder where the XML column x has any occurance of a node <tOrder><CID> with a value like the current cOrderNumber's value.
T-SQL adds the sql:column() method to XQuery, which allows to use the value of a row within the query. There's sql:variable() too.
The xml's method .exist() checks the XML for any existance of a given condition and returns with 0 or 1.
UPDATE
After reading your question once again, I'm not sure if I got this correctly... Please check the following. If this doesn't help, please use my code to set up a stand-alone sample to reprodcue your issue:
A dummy table with some orders
DECLARE @YourTable TABLE(cOrderNumber INT, OrderName VARCHAR(100));
INSERT INTO @YourTable VALUES
(100,'Order 100')
,(200,'Order 200')
,(300,'Order 300')
--Try to insert an XML with the existing OrderNumber=100
DECLARE @xml100 XML=
'<tOrder>
<cName>Name1</cName>
<cID>100</cID>
</tOrder>';
INSERT INTO @YourTable(cOrderNumber,OrderName)
SELECT @xml100.value('(/tOrder/cID/text())[1]','int')
,@xml100.value('(/tOrder/cName/text())[1]','varchar(100)')
WHERE NOT EXISTS(SELECT 1 FROM @YourTable AS t2
WHERE [email protected]('(/tOrder/cID/text())[1]','int'));
--Same code as above, but the order number is now a not existing number
DECLARE @xml101 XML=
'<tOrder>
<cName>Name1</cName>
<cID>101</cID>
</tOrder>';
INSERT INTO @YourTable(cOrderNumber,OrderName)
SELECT @xml101.value('(/tOrder/cID/text())[1]','int')
,@xml101.value('(/tOrder/cName/text())[1]','varchar(100)')
WHERE NOT EXISTS(SELECT 1 FROM @YourTable AS t2
WHERE [email protected]('(/tOrder/cID/text())[1]','int'));
--check the result
SELECT *
FROM @YourTable;
nr name
-------------
100 Order 100
200 Order 200
300 Order 300
101 Name1