We're dealing with geographic data with our Oracle database.
There's a function called ST_Insertects(x,y) which returns true if record x intersects y.
What we're trying to do is, compare each record of table A with all records of table B, and check two conditions
condition 1 : A.TIMEZONE = 1 (Timezone field is not unique)
condition 2 : B.TIMEZONE = 1
condition 3 : ST_Intersects(A.SHAPE, B.SHAPE) (Shape field is where the geographical information is stored)
The result we're looking for is records ONLY from the table A that satisfy all 3 conditions above
We tried this in a single select statement but it doesn't seem to make much sense logically
condition 1
,condition 2
andcondition 3
? Also, how do you plan to use the return value from your function, considering that plain SQL (Oracle implementation) is unaware of the Boolean data type? Make your function return 0 or 1 (NUMBER data type). – mathguy Dec 29 '16 at 23:30