根据给定的价值获取行
我将MSSQL表作为给定图像。我想知道如何从表Tblspace返回行,“可用”行的总和大于使用linq的值大于或等于给定的值。另外,有1到5的填充顺序。感谢
表格捕获和数据:> tblspace
1)。如果我以9,000为价值,则应仅返回Vienguard Row(9,000< 10,000)
2)。如果我以23,000为价值,则应同时返回Vienguard和Halestorm行(23,000< 10,000+15,000)
3)。如果我以35,000为价值,则应返回Vienguard,Halestorm和Quarts行(35,000< 10,000+15,000+20,000)
I have mssql table as the given image. I want to know how can I return rows from the table tblSpace that the sum of "Available" rows is greater than or equal to given value using Linq. Also there is a order of filling from 1 to 5. Thanks
Table capture and data:> tblSpace
1). If I pass 9,000 as value it should return only Vienguard row (9,000 < 10,000)
2). If I pass 23,000 as value it should return both Vienguard and Halestorm rows (23,000 < 10,000+15,000)
3). if I pass 35,000 as value it should return Vienguard, Halestorm and Quarts rows (35,000 < 10,000+15,000+20,000)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我认为您需要这样的东西吗?
编辑
如果您需要额外的价值,如果超出价值,请添加
Alright so I think you need something like this?
EDIT
In case you want an extra value if it exceeds you add