Installation Guides > Installing Data Model > Supported upgrade paths > UNICOM Intelligence JDBC Driver guide > UNICOM Intelligence JDBC Driver specification > Query from HDATA
 
Query from HDATA
When you query data from HDATA, the UNICOM Intelligence JDBC Driver converts data from the UNICOM Intelligence OLE DB Provider to the JAVA result set using the following rules:
Double
A 64-bit floating-point number with at least 15 digits of precision.
JAVA result set: A single column: Double
Long
A 32-bit signed integer.
JAVA result set: A single column: Integer
Text
A character string. The maximum length of a text variable is dependent on the DSC. The string might or might not support Unicode, depending on how the CDSC has implemented its storage. The Provider implements all strings using Unicode.
JAVA result set: A single column: String
Categorical
A single or multiple categorical response type. The maximum number of responses available varies between DSCs. A categorical response is implemented in the Provider as a string. The responses are in { } curly braces, with each response delimited by a comma. For example, {2,3,8} represents the responses 2, 3, and 8. Depending on how the data was collected, the order of responses in the string can be the order in which they were chosen in response to the question. This can be important for analysis.
JAVA result set: Column.Type is Categorical 129. The type is returned as a getTypeInfo method of DatabaseMetadata. The return value is determined by the connection properties. For more information, see Return category value.
Date
A 64-bit OLE date. The OLE date type contains both date and time and it is represented using the DATE type.
JAVA result set: A single column: DATE
Object
Not implemented.
JAVA result set: N/A
Boolean
A Boolean value of either True or False. This is implemented internally using VARIANT_BOOL. However, when a Boolean is converted to a Long or a Double, it will be converted to 1 for True and 0 for False.
JAVA result set: A single column: Boolean
Level
A hierarchical value. A level contains a child recordset.
JAVA result set: N/A for VDATA; a single BINARY column for HDATA
Array
Also called a Loop. These represent loops, grids, and levels. The Array object defines a question or set of questions that are to be asked more than once.
JAVA result set: Multiple columns. For more information, see Query array field in VDATA or Query array field in HDATA.
Class
These represent a grid question. A Grid object can be considered a special case of the Array object.
JAVA result set: Multiple columns. For more information, see Query class field in VDATA or “Query class field in HDATA”.
Compound
These group categorical and grid questions that share a category list, typically for presentation in a paper questionnaire.
JAVA result set: Multiple columns. For more information, see Query compound field in VDATA or “Query compound field in HDATA”.
Grid
These are used to group questions.
JAVA result set: Multiple columns. For more information, see Query grid field in VDATA or Query grid field in HDATA.
See also
Query array field in HDATA
Query grid field in HDATA
UNICOM Intelligence JDBC Driver specification
Query array field in HDATA
In HDATA, array fields are considered level. Querying a level field is same as querying all sub-fields of the level field. For more information, see Return level field.
You can query array object sub-fields from the array table. Array objects contain the specialty field LevelID, which is a sequential number in the current level.
Example
Using data from the UNICOM Intelligence Developer Documentation Library household.mdd example:
SELECT
^.housetype
, ^.address
, levelid
, age
, person
FROM HDATA.person
The result data is:
^.housetype
^.address
levelid
age
person
{59}
15B Park Avenue, Harrogate, HG1 4TY
1
25
1
{61}
46 Freedom Lane, Brighton, BN2 3YT
1
45
2
{61}
46 Freedom Lane, Brighton, BN2 3YT
2
43
3
{61}
46 Freedom Lane, Brighton, BN2 3YT
3
15
4
{61}
46 Freedom Lane, Brighton, BN2 3YT
4
12
5
{60}
The Meadows, Clifton Heights, BS34 3EG
1
72
6
{60}
The Meadows, Clifton Heights, BS34 3EG
2
81
7
{62}
23 Steep Hill, Norfold, CB64 5TY
1
32
8
{62}
23 Steep Hill, Norfold, CB64 5TY
2
9
9
{62}
23 Steep Hill, Norfold, CB64 5TY
3
2
10
{61}
 
1
29
11
{61}
 
2
31
12
...
...
...
...
...
See also
Query from 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. For more information, see Return level field.
You can query grid object sub-fields from the array table. Grid objects contain the specialty field LevelID, which is an element value of the current grid.
Single response grids and multiple responses grids
To return categorical values in JDBC, see Return category value.
Example
Using data from the UNICOM Intelligence Developer Documentation 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 Documentation 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
Query from HDATA