I have a table which contains the column COL1 like below
I have an another table contains two column FROM_CODE and TO_CODE. The values of this column are same as table 1 values.
My requirement is, based on below conditions the value needs to be fetch in the query.
1) If FROM_CODE is equals to COL1 then query should return 0
2) If TO_CODE is equals to COL1 then query should return 1
3) if both FROM_CODE and TO_CODE is same as COL1 then don't display the data in the query.
How to Unravel a Tricky Query
If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them. …
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…