DatabaseManager - SQL - Matching with LIKE not working

Events, Record Keeping, Utilities

Moderators: Moderators, Tech Support

Post Reply
GaryFanning
Posts: 3
Joined: Wed Apr 21, 2004 4:40 pm
Location: Liberty Church
Contact:

DatabaseManager - SQL - Matching with LIKE not working

Post by GaryFanning »

I am very new to PC, using PCP8.5, but have a few years working with SQL based databases. We made some rush decisions in importing data and then creating family units; husband and wife not being in the right order (number 1 or 2) and much more.

We want to remove all conventional titles; Mr., Mrs., Miss. seen in the "mailing name" of the "maintain family mailing list" screen.

When I attempt to SQL SELECT only rows with WHERE LIKE "Mr%" the system returns zero rows. In fact, playing around I see that using the SQL LIKE and more than one character returns zero rows each time, yet if I search for "M%" the system returns all rows correctly; all beginning with the character "M".

Here is an example of my query:

select * from MA where NAMELINE like 'mr%'

I've tested against another table/column (faaccts/desc) and the LIKE works.

So now I'm believing it must be something to do with the column "nameline" and wondering if it some type of view, etc.

Thanks,

Gary

Zoe
Tech Support
Tech Support
Posts: 58
Joined: Tue Sep 02, 2003 12:08 pm
Location: PowerChurch Software
Contact:

Post by Zoe »

Try this.

SELECT * FROM MA WHERE UPPER(NAMELINE) LIKE "MR%"

The database manager will read that command in all uppercase, so use the upper() to make the nameline uppercase as well.
PowerChurch Software Technical Support

Post Reply