Try using the following query:
Select DueDate, DeliveryDate,OrderNum
From
Invnum
Where OrderNum in (select OrderNum from Items) and DocState in (1,3)
and OrderNum in (SELECT SOno FROM vuForInvNumTrig WHERE (isnull(NoOfCntAllc,0) > isnull(Recd,0)) AND (POno = 'PO7943') AND SOno IS NOT NULL)
If you simply want to supress the warning then set the following before script
SET ANSI_WARNINGS OFF
and reset at the end.
SET ANSI_WARNINGS ON