Hi Guys,
I have an sql query on KDB as follows:
sql: "SELECT CUSIP, EXEC_PRC, TICK_TMSTMP , TICK_EFF_DT FROM TABLE WHERE ";
sql,:“TICK_EFF_DT = TO_DATE('”, (string x),“‘,‘YYYY.MM.DD’) AND CUSIP IN (’”, (string z),"') ";
The parameters z and x in the sql query are cusip and dates resp ( it is a dynamic sql query).
I would like to improve this query by adding another timestamp filter (highlighted in bold)
my timestamp in the database has the following format TICK_TMSTMP=(‘2016-04-04 06:00:00’).
How can I improve the sql query but adding a timstamp filter please? I would like to keep the same dynamic query but add another dynamic filter that focuses on the timestamp
Many Thanks
S