Learn how to convert CCL to q datatypes, q types to CCL, and q values to CCL rows.
If you wish to convert a CCL datatype to a q datatype other than the type to which it automatically converts, explicitly cast the CCL datatype as the desired q type, as described in EXECUTE STATEMENT DATABASE.
CCL datatype |
Q datatype |
---|---|
BLOB |
list of byte |
BOOLEAN |
boolean |
FLOAT |
float |
INTEGER |
int |
INTERVAL |
long |
LONG |
long |
STRING |
list of char |
TIMESTAMP |
datetime |
XML |
list of char |
Q datatype |
CCL datatype |
---|---|
boolean |
BOOLEAN INTEGER |
byte date int minute month time second short |
INTEGER LONG Time types are set to their q integer representation. |
long |
INTEGER (On overflow, if value is greater than MAX_INT, the value is set to NULL.) LONG |
real float |
FLOAT |
char list of char symbol |
STRING |
datetime |
TIMESTAMP |
Other types |
Conversion not supported |
When a database subquery includes a statement using the SQL dialect of q (as opposed to regular q syntax), data is read into CCL from kdb+ as it would be from any database: each row returned by the SQL dialect of q is read into a row in Sybase CEP Engine with the same number of columns. When a database subquery includes a statement using simple q (not its SQL dialect), the results returned by the q statement are mapped as shown in the following table.