EasyManuals Logo

HP NonStop SQL/MP User Manual

HP NonStop SQL/MP
331 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #49 background imageLoading...
Page #49 background image
Host Variables
HP NonStop SQL/MP Programming Manual for C—429847-008
2-15
Date-Time and INTERVAL Data Types
INTERVAL values are represented as character strings with a separator between the
values of the fields (year-month or day-time). An extra byte is generated at the
beginning of the INTERVAL string for a sign. The default representations for DATE and
INTERVAL values are shown in these examples.
DATE Representation
The column definition and representation in the table for December 22, 1988 is:
birth_date DATE
If the DATEFORMAT clause on the INVOKE directive specifies DEFAULT, a column
with the range of fields YEAR TO DAY is represented as an 11-character string
(10 characters plus a byte for a null character). The C compiler creates this structure:
struct employee_rec {
char name[18];
char birth_date[11];
};
INTERVAL Representation
The column definition and representation in the table for 36 years, 7 months is:
AGE INTERVAL YEAR(2) TO MONTH
The C compiler creates this structure:
struct employee_rec {
char name[21];
char age[7];
};
012
1
9
8
8
1
2
2
2


Year
Separator
Month
Day
Null
013
+
3
6
0
7

Sign
Year
Separator
Month
Null

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP NonStop SQL/MP and is the answer not in the manual?

HP NonStop SQL/MP Specifications

General IconGeneral
BrandHP
ModelNonStop SQL/MP
CategorySoftware
LanguageEnglish

Related product manuals