Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Extracting specific value from a table

I have the tabe:

As: 11 43 23 67 76 
Bs: 87 38 70 8 10 
syms:A`B where 4 4
AA:([] A:As;B:Bs)
1#select A from AA

I get the output

A 
--
11

I would like to know how to just have the value returned instead of having the output to be a table? So, in this case, it would just return 11.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

One of numerous ways to do this

q)AA[0]`A
11

to get last item

q)last[AA]`A
76

or both at once

q)(first;last)@\:AA`A
11 76
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading