By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,915 Members | 1,340 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,915 IT Pros & Developers. It's quick & easy.

Elt Command - Extracting single item from group from field

P: n/a
X
I have a varchar field which contains a comma delimeted set of data. I
am trying to us the ELT function to extract the first part of the group.
Problem is, ELT does not seem to work when the data comes from a field.
If I take the data and do,

select elt(1,"red","green","blue")
RESULT would be "red"

But if the data was stored in a field (called group) and I did:

select elt(1,group)
RESULT would be red,green,blue

Why is this a problem? I am running mysql 4.1.0 on windows. I am going
to try this on another / older / newer version of a DB today and see if
I can replicate the problem. Wandering if this is a bug or not?

Also, does anyone know if there is a function that compares sets
together. Similar to find_in_set, except both the needle and the
haystack are sets.

Thanks
Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.