Jump to content

Selecting data used in a FIND_IN_SET type query


Recommended Posts

I wasn't really sure how to phrase the subject and I'm not sure if this can be done, but lets see:

 

I have yearly data that is stored like this:

 

Name | Agreed

--------|----------

Joe    | 2009-2010,2010-2011

Mary  | 2009-2010

 

What I'm trying to do is make a query for a drop down list that will say "Please choose a year range" and I want to avoid hand coding it, but rather list only those years that have already been entered by people. Since each date isn't stored in a separate column I don't think I can do group by.

 

Anyone have some thoughts on if it can be accomplished?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.