Relative Content

Tag Archive for db2db2-luw

DB2 With clause conditional select

In my java code, I have written a native query. The below list object should be parametrizable, as like list = ('a','b')
But my intension will be that one of the subqueries should only be executed, when there is a match of the given list with the constant ‘a’, ‘b’ ….
Is it possible?

DB2 table functions

I want to return a table in a function with using the given parameters.
The statement will be at the end very long, that’s why I want to use a cursor.