kdb+ and q
Q+A on all things kdb+ database and the q language
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

Question about getting last Quote change

Hi all, for historical data, say I use "aj" to join the trade and quote data, then I have the current quote per trade happening. Then if I like to see when is the last change of quote price, or when is the next change to quote price, what I know is l...

carfield1 by New Contributor
  • 7 replies
  • 0 kudos

Replace multiple whitespaces with 1

Hi,I am having trouble replace multiple whitespaces with 1. E.g., ssr["replace with one";"\\s+";" "] does not work. Your help is much appreciated. Thank you.Tori

sututor by New Contributor
  • 5 replies
  • 0 kudos

How to pack a byte in q/kdb

What I'm trying to do here is pack a byte like I could in c# like this:string symbol = "T" + "\0"; byte orderTypeEnum = (byte)OrderType.Limit; int size = -10; byte[] packed = new byte[symbol.Length + sizeof(byte) + sizeof(int)]; // byte = 1, int = 4 ...

rtrader by New Contributor
  • 3 replies
  • 0 kudos

inserting timestamp

what's wrong with this?x: ([] time:`timestamp$(); v:`int$())x,: (2#.z.p; 2#1)`type/this works`x insert (2#.z.p; 2#1)/this also worksx: ([] y:`int$(); v:`int$())x,: (2#1; 2#1)