newbie question: 'rank error on table insert insert

trying to insert a record to a table:

q):/db/data/ set ([] nodeid:12345; object:$“hithere” ti:09:30:00)

`rank

what does the `rank error mean ..?

Thanks

your syntax stinks.

(nodeid:enlist 12345; object:enlist`$“hithere”;ti:enlist 09:30:00)

To: personal-kdbplus@googlegroups.com
X-Mailer: Apple Mail (2.1084)

>> q):/db/data/ set ([] nodeid:12345; object:$“hithere” ti:09:30:00)
>> rank \> \> your syntax stinks. \> \> ([]nodeid:enlist 12345; object:enlist$“hithere”;ti:enlist 09:30:00)

actually q will vector-extend any atoms in a table literal, as long as =
there’s at least one actual vector to give the count

q)(nodeid:enlist 12345;object:`hithere;ti:09:30:00)
nodeid object ti

12345 hithere 09:30:00
q)(nodeid:12345;object:enlist`hithere;ti:09:30:00)
nodeid object ti

12345 hithere 09:30:00
q)(nodeid:12345;object:`hithere;ti:enlist 09:30:00)
nodeid object ti

12345 hithere 09:30:00
q)

(in a keyed table, there must be at least one vector in the keys and one =
in the values:

q)([nodeid:12345;nodetype:1]object:enlisthithere;ti:09:30:00) 'rank q)([nodeid:enlist 12345;nodetype:1]object:enlisthithere;ti:09:30:00)

nodeid nodetype object ti
12345 1 hithere 09:30:00
q)

)=

you’re missing a semicolon after “hithere” so the table has only 2columns rather than 3, hence the rank error.On May 16, 2:30?am, Dodong Juan <dodongj…> wrote:> trying to insert a record to a table:>> q):/db/data/ set ([] nodeid:12345; object:$“hithere” ti:09:30:00)> rank&gt;&gt; what does the rank error mean ..?>> Thanks</dodongj…>