var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: values separated by ',' and query values
I have a table that have a field with values separated by ',' .
I want to make a query that return values some spesific values (more than one) of (example 3,4 or 3 or 3,4,5).
Which is the best way to do that?
I'd rather be riding on the Tiger 800 or the Norton
Most people try to get their data in to
3NF. Your data is not even in 1NF which is why you're having problems. I'd suggest reading up a bit on normal forms and then just altering your table to hold each value separately ie
Then all you have to write is
# original string "aaa,bbb,,ddd,eee"
insert mytable ( seq, myfield ) values ( 1, "aaa" );
insert mytable ( seq, myfield ) values ( 2, "bbb" );
insert mytable ( seq, myfield ) values ( 4, "ddd" );
select myfield from mytable where seq in (1,2,3)