Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

'not equal' (<>) in combination with 'or' does not work?

SQL SELECT * FROM Periodecomponenten Where cdwerkgever <> '$(Werkgever1)' or cdwerkgever <> '$(Werkgever1)' ;

5 Replies
Not applicable
Author

Hi,

What is your source database. If its oracle, you can use the 'Not in' function instead of the 'or' statement as follows:


SQl
Select *
FROM Periodecomponenten
WHERE

cdwerkgever not in (
'$(WERKGEVER1)' ,'$(WERKGEVER2)','$(WERKGEVER4)','$(WERKGEVER5)')



Not applicable
Author

In this case it's an SQL database.

Not applicable
Author

this should work fine with SQL Server also.

Not applicable
Author

The 'not in' function will work fine with SQL server also

Not applicable
Author

Thank you for your fast respons Haneesh!