本文介绍了查询问题。没有清除此查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 string qry = string.Format(@ WITH PayPeriod AS( SELECT CAST(DATEADD(day,1,DATEADD({3}, - {2},'{1}'))AS DATE)[StartDate],CAST('{1}'AS DATE)PPE UNION ALL SELECT CAST(DATEADD({3}, - {2},P。[StartDate])AS DATE)[StartDate],DATEADD(day,-1,CAST(P. [StartDate] AS DATE) ))[PPE]来自PayPeriod P WHERE P. [StartDate]>'{0}' )SELECT PPE from PayPeriod,arr [ 0 ]。TrimEnd(' ') ,arr [ 1 ]。TrimEnd(' '),payfrequency,diff); 注意:我不明白这个查询可以有人解释,任何帮助都将受到高度赞赏。 谢谢解决方案 string qry = string.Format(@"WITH PayPeriod AS( SELECT CAST(DATEADD(day,1,DATEADD({3},-{2},'{1}')) AS DATE) [StartDate] ,CAST('{1}' AS DATE) PPE UNION ALL SELECT CAST(DATEADD({3},-{2},P.[StartDate]) AS DATE) [StartDate] ,DATEADD(day,-1,CAST(P.[StartDate] AS DATE))[PPE] FROM PayPeriod P WHERE P.[StartDate] >'{0}' ) SELECT PPE FROM PayPeriod", arr[0].TrimEnd(' '), arr[1].TrimEnd(' '), payfrequency, diff);Note: I don,t understand this query can someone explain, any help will highly be appreciated.Thank you 解决方案 这篇关于查询问题。没有清除此查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-28 06:30