Tech blog

Tuesday, November 15, 2005

Must have utilities

These utilities are very useful:

  • JRuler

  • Lutz Roeder's .NET Reflector

  • nAnt

  • RegEx Buddy

  • Trillian

  • Visual XPath

  • WebServices Studio

Oracle weirdness redux

Okay, this is basically just a difference between SQL Server and Oracle. It isn't really weird but you should be aware of it:

Cast ('xxx' AS datetime) doesn't work because datatime is not an Oracle type. The correct way to do this in Oracle is by using the TO_DATE function like this:

TODATE('xxx')

In my app, I use a data access layer to compensate for Oracle's differences. The first string can easily be converted to the second by using the Regex.Replace method:

sql = Regex.Replace(sql,@"cast\((.+) as datetime\)",
"TO_DATE($1)",
RegexOptions.IgnoreCase);