JDBC Driver > UNICOM Intelligence JDBC Driver specification > Query from HDATA > Query grid field in HDATA
 
Query grid field in HDATA
In HDATA, grid fields are considered level. Querying a level field is same as querying all sub-fields of the level field. See Return level field for more information.
You can query grid object sub-fields from the array table. Refer to the examples below for more information.
Grid objects contain the specialty field LevelID, which is an element value of the current grid.
Single response grids and multiple responses grids
For information on returning categorical values in JDBC, see Return category value.
Example
Using data from the UNICOM Intelligence Developer Library museum.mdd example:
SELECT
^.name
,levelid
,column
FROM HDATA.RATING
The result data is:
^.name
levelid
column
MyName
{31}
{52}
MyName
{32}
{}
MyName
{33}
{}
MyName
{34}
{}
MyName
{35}
{}
MyName
{36}
{}
MyName
{37}
{}
MyName
{38}
{51}
MyName
{39}
{52}
MyName
{40}
{}
MyName
{41}
{50}
MyName
{42}
{51}
MyName
{43}
{}
MyName
{44}
{51}
MyName
{45}
{}
MyName
{18}
{}
 
...
...
Numeric grids
Example
Using data from the UNICOM Intelligence Developer Library short_drinks.mdd example:
SELECT
Levelid
,mond
,tuesd
FROM HDATA.numdrksz
The result data is:
LevelID
mond
tuesd
{48}
5
4
{49}
2
3
{50}
0
0
{51}
0
0
{52}
0
1
{53}
0
0
{54}
0
0
{48}
3
3
{49}
4
3
{50}
0
0
{51}
0
0
{52}
0
0
{53}
0
0
{54}
0
0
...
...
 
See also
SQL syntax
Database metadata
UNICOM Intelligence data types
Query from VDATA
Query from HDATA
Return category value
Return level field
UNICOM Intelligence JDBC Driver specification