我正在编写查询以提取数据,但是在使我的语句正常工作方面遇到了一些困难。我相信问题在WHERE子句中。
SELECT DISTINCT h.id,
h.status,
a.billing_state,
d.queue_desc,
r.role_desc,
Datediff(day, recd_dt, Getdate() + 1) AS AGE,
h.drag_dt
FROM dbo.tbl_1 h
JOIN dbo.prov p
ON h.id = p.id
JOIN dbo.address a
ON p.id = a.id
LEFT JOIN dbo.queue_msg m
ON h.id = m.msg_id
LEFT JOIN dbo.queue_def d
ON m.queue_id = d.queue_id
LEFT JOIN dbo.roles r
ON m.role_id = r.role_id
JOIN dbo.me_msg w
ON h.ck = w.ck
WHERE h.ck = '123'
AND a.type = 'PRI'
AND w.seq_no = '00000'
AND h.status IN ( '01', '02', '03' '04')
AND (( h.drag_dt BETWEEN '9999-01-01 00:00:00.000' AND
'9999-12-31 00:00:00.000'
AND h.status = '04' )
OR ( h.drag_dt BETWEEN '3334-01-01 00:00:00.000' AND
'3334-12-31 00:00:00.000'
AND h.status = '04' ) )
ORDER BY
h.drag_dt
DESC
我要返回的内容; -h.ck为123的记录 -属于PRI类型的记录 -w.seq_no为00000的记录 -记录的状态为01、02、03或04
在上面返回的记录中,我希望以下内容也成立”; -如果记录的h.drag_dt年份为9999或3334,则仅返回h.status = 04的 -如果记录的h.drag_dt年份不是9999或3334,则仅返回h.status为01、02或03的记录。
答案 0 :(得分:0)
如果我理解正确,那么您就在那儿,我怀疑这就是您追求的目标:
<Slider Minimum="0" Maximum="1000">
<Slider.Value>
<MultiBinding Converter="{StaticResource MyConverter}">
<Binding Delay="3000" Path="FrequencyXState"/>
<Binding Delay="0" Path="FrequencyX" UpdateSourceTrigger="PropertyChanged" />
</MultiBinding>
</Slider.Value>
</Slider>