From: "b logica" <foo.log...@gmail.com>
Date: Thu, 27 Mar 2008 15:33:58 -0400
Local: Thurs, Mar 27 2008 3:33 pm
Subject: Re: Run query in background while showing "Please wait"
On Thu, Mar 27, 2008 at 12:59 PM, kdecapite <decap...@creationsite.com> wrote: I could be misinterpreting your needs, but ... > I may have not explained the setup properly. I don't actually have a SELECT c.id, c.fn, c.ln FROM contacts AS c This will select the id, fn, and ln from contacts where it also exists > The only idea I have at the moment is to create a field in both tables UPDATE TABLE contacts ADD COLUMN full_name VARCHAR(128); -- or whatever size > which simply stores the concatenated value of a record's "fn" and "ln" > fields. This would require me to write a script to retro-fit the > existing 30k contact records, as well as update some logic in my "add > contact" controller. Not to mention this would also create a redundant > field in the table and still doesn't ultimately solve the problem > because what if in the future I want to find duplicates matching "fn", > "ln" and "mi" (middle initial)? I would have to create yet another > "dummy" field in my table. UPDATE TABLE contacts SET full_name = CONCAT_WS(' ', fn, ln); BUT, you'd probably be far better off simply creating an index on the tables: CREATE INDEX contacts_fullname ON contacts (fn, ln); This is all for MySQL, which i'm assuming you're using. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||