OCI/Pro*C : How to Find out Column Names Used in Where Condition
Hi this seems to be a brainer. Is there an easier way in Pro*C or OCI to find out which columns have been used in the 'Where' condition in a given SQL statement? Eg if we have a statement like 'select empno from emp where desig=:InDEsig'. We can find out bind variable name(InDEsig) and select-list column (empno) easily by describing the statement. But how can we determine the column 'desig' has been used in the where condition? In complex statement, there can be even more columns. One rather labourious way is to dissect the statement by parsing it on ':' and then figure out what the column name is(a terrible C or C++ exercise!!). I am trying to do this, if I will come up with some hints I will post it, in the meantime any hints from any hard working souls?? Thank you.