Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
401 views
in Technique[技术] by (71.8m points)

between后面如果是变量,是不是只能改写为 a<x1 and a>x2 这种模式

在DolphinDB database的GUI中,执行ListedDate between (date_begin+":"+ date_end),提示“The second argument of 'between' must be a pair”,如下图所示:
bwtween_20200528155419.png

请问一下:这个between 后面如果是带变量,是不是只能改写为 a<x1 and a>x2 这种模式?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

可以用下面代码所示方式:

t=table([2,3,NULL,1] as v,[2010.01.01,2010.01.01,2010.01.03,2010.01.02] as dates)
d1=2010.01.01
d2=2010.01.02
select * from t where dates between d1:d2

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...