Domanda

I am trying to write Pro*C/C/C++ code to handle a query like this:

SELECT col1, col2, col3, col4 FROM table WHERE param IN(<set of values>);

I can have a C struct to retrieve the result and pass individual parameters but I can't seem to find a way to do this without explicitly specifying every value in the list.

Is there a way to pass the set as an array/vector/list?

È stato utile?

Soluzione

I asked that same question at How to specify a variable expression list in a Pro*C query?

I came up myself with a rather clumsy solution that works in my specific case. It might not apply to yours.

Altri suggerimenti

Check the in_list and in_list_v operators

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top