Hi all
I’ve a table with trade records there, every trade record have difference condition code relate with it. Say for trade1, it can have
codename1=codevalue1
codename2=codevalue2
codename3=codevalue3
Currently the trade table model as
date,time,price,size,codenames,codevalues
Where in the above example, codenames will be “codename1;codename2;codename3” and codevalues will be “codevalue1;codevalue2;codevalue3”, both in string.
Now I need to filter the record only by codevalue2, so first I covert codenames and codevalues to a new dictionary column:
tradeDict:update dictcode:{ vs[“;”;x[0]]!vs[“;”;x[1]]} each flip(codenames; codevalues) from trade
It look like working, if I run
exec last dictcode from tradeDict
I can see the dictionary of code name and value at last row in a dictionary form
However, if I run query
select from tradeDict where $dictcode["codename2"]=
$“codevalue2”
I get the type error, just wonder, how can I query a dictionary column in a table?
Thanks