Hi,
I have a table called tbl with 4 columns, A,B,C,D, with the following
schema
q)meta tbl
c | t f a |
---|---|
A | s |
B | c |
C | f |
D | f |
Then the following query was executed on tbl:
tbl: select C:C[where D=max(D)], D:max(D),by A,B from tbl;
this causes, the schema of tbl to be changed to
q)meta tbl
c | t f a |
---|---|
A | s |
B | c |
C | F |
D | f |
Type of Column C has changed to ‘F’ from ‘f’. I have a C++ code which
interacts with q database, and while retrieving the values from the
database for C, D ( via kF() ) the values for D come out correct but
the values for C are being fetched as 0, despite the q console showing
non-zero values for C.
How do I fetch correct values for type ‘F’ from the c++ code? Also,
why does the by statement change the schema to ‘F’.?
I tried an explicit typecast like tbl: select C:"f"C[where D=max(D)],
D:max(D),by A,B from tbl;
This didn’t help either.
Regards,
Nav