在 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/