Creating the SELECT Statement to Read from an Array
From InterBase
Go Up to Reading Data from an Array
Elicit a statement string from the user or create one that consists of the SQL query that will select rows containing the array data of interest. In your query, specify the array column name and the names of any other columns containing data you are interested in. For example, the following creates a SQL query statement string that selects an array column named QUART_HEAD_CNT
and another column named DEPT_NO
from the table, PROJ_DEPT_BUDGET
:
char *sel_str = "SELECT DEPT_NO, QUART_HEAD_CNT FROM PROJ_DEPT_BUDGET
WHERE year = 2003 AND PROJ_ID = 'DATABASE'";