Sam11
October 11, 2012, 5:04pm
1
How do I insert into a table after I insert a linked column into it?
e.g.
t:( id:101 102 103 104; v:1.1 2.2 3.3 4.4)
update parent:t!id?101 101 102 102 from
t
q)t
id v parent
101 1.1 0
102 2.2 0
103 3.3 1
104 4.4 1
q)`t insert (103;3.2)
'length
q)`t insert (103;3.2;0N)
't
Sam11
October 11, 2012, 11:50pm
2
Thanks. I still can’t figure out how to insert into a table (containing the link) from another table and update the link.
e.g.
t1:( c1:sym?
cb
a; c2: 10 20 30)
t2:( c3:sym?
ab
a`c; c4: 1. 2. 3. 4.)
update t1link:t1!t1.c1?c3 from
t2
t3:( c3:sym?
de
f`g; c4: 1. 2. 3. 4.)
Now, how do I insert t3 records into t2.
Sam11
October 12, 2012, 3:20am
3
Never mind I figured it out. I can do this -
t2 insert select c3,c4,t1link:
t1!t1.c1?c3 from t3