If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > query question help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-11-05, 07:17
wyshyl wyshyl is offline
Registered User
 
Join Date: Oct 2005
Posts: 4
Talking query question help

Hi, I have a address table, I wanna to categorize the address according to their names, for example, any names include 'association', or 'organizaiton', or 'law', the problem is I just query only part of the field item, and these queries may get duplicate records.

Here is samples of the name field:
Afrcian Bar Association
African Association of International Law
etc.

Please help me to figure it out, thanks.
Reply With Quote
  #2 (permalink)  
Old 10-11-05, 10:10
marist89 marist89 is offline
Registered User
 
Join Date: Oct 2002
Location: greenwich.ct.us
Posts: 279
IMHO, the best solution would be to add a "category" field to each address. That way, you can incrementally modify the records according to different business rules.

Otherwise, I'd use a CASE statement (mysql has CASE, right).
__________________
Jeff Hunter
http://marist89.*************
Reply With Quote
  #3 (permalink)  
Old 10-12-05, 06:08
wyshyl wyshyl is offline
Registered User
 
Join Date: Oct 2005
Posts: 4
thank you marist89, category is fine, but how to descript the name involves "law"?

thank you marist89, category is fine, but how to descript the name involves for example "law"? Thanks.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On