Window Join w/ Multiple Symbols

https://learninghub.kx.com/forums/topic/window-join-w-multiple-symbols

Whats good, Qbies.

I have 2 tables I’m trying to put together with a window join using symtime columns.

The output table comes through fine, but I go through the data and it’s clearly mixing results from different symbols. What gives?

I’ve checked datatypes and everything seems in order, with `sym amounting to a “s” type in both tables.

Any help greatly appreciated!

update `p#sym from q / or @[q;`sym;`p#]

/ may need to sort first if it isn’t already

update `p#sym from `sym`time xasc q

wj requires parted attribute on sym column of 2nd table:

t and q are simple tables to be joined (q should be sorted `sym`time with `p# on sym)

Window join | Reference | kdb+ and q documentation - Kdb+ and q documentation (kx.com)
I’ve found when doing this with more than one sym column you need to join them together and sort/apply part to a combined column.

Also depending on what you are doing, an aj at the start and end of your window can be faster but depends on what you are trying to do.

Yeah, I took a look at aj but ultimately wj just better suites my needs.

So I’ve got the tables sorted sym time but seem to be missing on the `p# part (pun maybe intended).

How does one `p# a column in a table properly?

that was it, thanks!