Hi SQL GURU's,Im trying to compare 2 table but i dont want that Table2 use a text .noc in the result.Following syntax was just:select snetworkname from WhatsUp.dbo.NetworkInterface right outer join WhatsUp.dbo.device on WhatsUp.dbo.NetworkInterface.nNetworkInterfaceID = whatsup.dbo.device.nDefaultNetworkInterfaceIDwhere sNetworkName NOT IN (select item_keya as snetwork from dbo.item where item_keya is not null and item_keya <> '')I get the following result: AA-SR-CO-0007.nocabb-beanr-wrh1.nocabb-be-s-cmzav.nocABB-BEZAV-WRH10.nocABB-BEZAV-WRH6.nocABB-BEZAV-WRH7.nocABB-BEZAV-WRH8.nocABB-BEZAV-WRH9.nocabb-lustn-wrh1.nocabb-nlamv-wrh1.nocABB-NLEDE-WRH3.nocABB-NLETT-WRH2.nocABB-NLRTM-WRH1.nocABB-NLRTM-WRH2.nocYou see that the colums networkname ends always with '.noc'... The column item_keya dont have the .noc in his results. What i want is een syntax that gives the results without .noc in it and still compare with the columns. Like this results:AA-SR-CO-0007abb-beanr-wrh1abb-be-s-cmzavABB-BEZAV-WRH10ABB-BEZAV-WRH6ABB-BEZAV-WRH7ABB-BEZAV-WRH8ABB-BEZAV-WRH9abb-lustn-wrh1abb-nlamv-wrh1ABB-NLEDE-WRH3ABB-NLETT-WRH2ABB-NLRTM-WRH1ABB-NLRTM-WRH2How can i get that result and still compare with the two tables?I have just the Like syntax but that not what im looking for because he take only the words..
↧