Tech blog

Tuesday, July 19, 2005

Oracle weirdness

These are a few differences between Oracle & SQL Server:

  • The byte order for guids is different:
0c5f13c3-7063-4b2d-8e58-de9d689bd3b1
becomes
c3135f0c63702d4b8e58de9d689bd3b1
  • use "" instead of [] for reserved words. Oracle cares about case when you do this
  • use || instead of + to concatenate text.


  • when searching for a literal _ (underscore) as part of a LIKE search, construct the LIKE statement this way:

    SELECT * FROM snuser WHERE username LIKE '%sn\_%'  ESCAPE N'\'


    this works for both Oracle and SQL Server.

0 Comments:

Post a Comment

<< Home