gpt4 book ai didi

c# - 将 C# 中的 DateTime.MinValue 替换为 sql

转载 作者:太空宇宙 更新时间:2023-11-03 13:41:11 25 4
gpt4 key购买 nike

在 C# 中,我使用了 linq,其中我使用了最小值的 DateTime。我将在 oracle 中转换此查询。

select x 
from x in Context.GetRolePlansQuery(AppResources.CurrentUser.Role.RoleId,
AppResources.CurrentUser.Loginid,
AppResources.CurrentUser.Tpa.TpaId) where
x.LAST_STAGE_COMPLETE.ToUpper() == "RECEIVED"
orderby (x.CDC_COMPLETE_DATE.HasValue ? x.CDC_COMPLETE_DATE : DateTime.MinValue) descending
select x

我想知道oracle中最小值的服务器日期时间。

最佳答案

这应该让您对 oracle sql server 数据类型的取值范围有一个清晰的了解: http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements001.htm#i54330

但是.net对象的min值和sql server的数据类型是有区别的,DateTime.MinValue的min值是0001/1/1。

关于c# - 将 C# 中的 DateTime.MinValue 替换为 sql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16955641/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com