469,592 Members | 1,948 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

Elt Command - Extracting single item from group from field

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.

Jul 20 '05 #1
0 1185

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by dixie | last post: by
2 posts views Thread by henrik | last post: by
4 posts views Thread by fniles | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.