将C#中的DateTime.MinValue替换为sql
在C#中,我使用了linq,其中我使用了最小值的DateTime。 我将在oracle中转换此查询将C#中的DateTime.MinValue替换为sql,c#,oracle,C#,Oracle,在C#中,我使用了linq,其中我使用了最小值的DateTime。 我将在oracle中转换此查询 select x from x in Context.GetRolePlansQuery(AppResources.CurrentUser.Role.RoleId, AppResources.CurrentUser.Loginid,
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数据类型的值范围有一个大致的了解:
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
但是,.net对象的最小值与sql server数据类型不同,DateTime.MinValue的最小值为0001/1/1。