On Tue, Mar 25, 2008 at 03:09:43PM -0400, Rick Runyan wrote: > org.dspace.eperson.EPerson.searchResultCount(EPerson.java:326) > > where it says > > TableRow row = DatabaseManager.querySingle(context, > > "SELECT count(*) as count FROM eperson WHERE > eperson_id = ? OR " + > > "firstname ILIKE ? OR lastname ILIKE ? OR email > ILIKE ?", > > new Object[] > {int_param,dbquery,dbquery,dbquery}); > > I'm pretty sure "ILIKE" doesn't work in Oracle, but I see this in the > 1.4.2 code and I'm pretty sure I was able t create some users in that. > Does anybody have any idea about what's wrong here?
ILIKE is not SQL; it's a PostgreSQL extension. It's a case-insensitive version of LIKE (which *is* SQL). The query could probably be rewritten as: SELECT count(*) as count FROM eperson WHERE eperson_id = ? OR LOWER(firstname) LIKE LOWER(?) OR LOWER(lastname) LIKE LOWER(?) OR LOWER(email) LIKE LOWER(?) or as: SELECT count(*) as count FROM eperson WHERE eperson_id = ? OR LOWER(firstname) LIKE ? OR LOWER(lastname) LIKE ? OR LOWER(email) LIKE ? if dbquery is guaranteed to be lowercase already. Possibly these queries would be slightly slower than what we have now, but I would suggest that this is a place where a PGism should be sacrificed for portability. -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software vendor says that a product is "intuitive" he means the exact opposite.
pgpv35eb2RN8Q.pgp
Description: PGP signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech