예제 #1
0
 string SetValueToStr(MergePramInfo info)
 {
     if (info.Type == typeof(string))
     {
         return("'" + info.Value.Replace("'", "''") + "'");
     }
     else if (info.Type == typeof(DateTime))
     {
         return("to_date('" + info.Value + "','yyyy-mm-dd hh24:mi:ss')");
     }
     else
     {
         return("'" + info.Value.Replace("'", "''") + "'");
     }
 }
예제 #2
0
 string SetValueToStr(MergePramInfo info)
 {
     if (info.Type == typeof(string))
     {
         return("'" + info.Value?.Replace("'", "''") + "'");
     }
     else if (info.Type == typeof(DateTime))
     {
         return("( SELECT CASE ISDATE('" + info.Value + "') WHEN 1 THEN cast('" + info.Value + "' as DATETIME) ELSE cast('1900-1-1' as DATETIME) END )");
     }
     else
     {
         return("'" + info.Value?.Replace("'", "''") + "'");
     }
 }