.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

NOT LIKE ccondition not working properly..plz help

Posted By: Sandeep Tripathi     Posted Date: August 08, 2012    Points:5   Category :Sql Server
($OPERATION$ = "CREATE") AND ( ( NOT $GROUPS$ LIKE "%Product Data Admin%") OR ( NOT $GROUPS$ LIKE "%CARES Data Admin Team%") )


this is not working but when i remove one condition from OR,it works well,,,plz any idea......i need all three conditions,,,one with AND and other with OR

Responses
Author: Narayanan             
Posted Date: August 08, 2012     Points: 20   

Hi,
Try this way...
Old Code
($OPERATION$ = "CREATE") AND ( ( NOT $GROUPS$ LIKE "%Product Data Admin%") OR ( NOT $GROUPS$ LIKE "%CARES Data Admin Team%") )


My Code:
(($OPERATION$ = "CREATE") AND (NOT $GROUPS$ LIKE "%Product Data Admin%" OR  NOT $GROUPS$ LIKE "%CARES Data Admin Team%"))


Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
Author: Sandeep Tripathi             
Posted Date: August 08, 2012     Points: 20   

Got it..It should be:
($OPERATION$ = "CREATE" ) AND (NOT ($GROUPS$ LIKE "%Product Data Admin%" )) AND (NOT ($GROUPS$ LIKE "% CARES Data Admin Team %" ))

bcoz AND NOT is equal to OR

Thanks and regards,
Sandeep


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend