Re: LIKE operator on CHAR column when there is no wildcard character

From: Dion Cho <>
Date: Wed, 9 Jul 2008 01:57:36 -0700 (PDT)
Message-ID: <>

I think, in your case, there is no direct and easy way.

There would be some other bizzare approaches. One thing i can think of is like this:

  • Your table is t1
  • Rename t1 to t1_sucks
  • create view t1 as select ... trim(c1) as c1 from t1_sucks
  • create instead of trigger to fix DML
  • Now the orignial query c1 = 'a' is converted to trim(c1) = 'a' via view

Looks ugly to me, but just an option.

Dion Cho Received on Wed Jul 09 2008 - 03:57:36 CDT

Original text of this message