Build dynamic query in C++
Posted on 2004-11-03
I am getting used to code in C++, so not so strong ...here is what i am having trouble with. I have a SQL select stmt in which i need to pass a String var as a concatenttion to complete the qry based on values passed to the column. An example of what i am talking abt is :
Original SQL in the ap:
sqry = "SElect col1,col2,col3 from table A where col1 = something and col2 = something"
Now the requirement is :
I have built a string like
str = " And col3 in ( "A") ";
I need to add the above "str" in the prev qry in the end .
Any help in this will be greatful