I was wondering if anyone can help me write some code for the following logic.
We have a table
----------------
id, lang, letter
----------------
1 1 E
1 1 E
1 1 E
1 1 E
2 2 F
Problem:
I need to select ALL the rows for which the following condition fails:
- id = lang (ie its either 1 or 2)
- lang = 1 when letter = ‘e’ OR lang=2 when letter=2
I know I can hard code it. Also i would like to do this in ONE query only.
Please help
I think this is what you want to exclude the records meeting that criteria:
to get the records with that, just remove the
NOTit: