Re: LIKE operator on CHAR column when there is no wildcard character
From: Dion Cho <ukja.dion_at_gmail.com>
Date: Wed, 9 Jul 2008 01:57:36 -0700 (PDT)
Message-ID: <ba565624-5e1a-4f86-98eb-cb6f9ea6942a@p25g2000hsf.googlegroups.com>
Date: Wed, 9 Jul 2008 01:57:36 -0700 (PDT)
Message-ID: <ba565624-5e1a-4f86-98eb-cb6f9ea6942a@p25g2000hsf.googlegroups.com>
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