darence
asked on
Question - Comma as seperator?
Hi!
I would like to knoe if anyone knoes if i have a coloum name called Interest where people can key in different things, how am i gona differentiate it?
Like my interest is play games , soccer , basketball , singing...
How am i gona seperate like soccer into an individual interest ?
Can we like use comma?
Also... if we use coma, when we do our select statement...
how shall we go bout doin it?
Please advice
I would like to knoe if anyone knoes if i have a coloum name called Interest where people can key in different things, how am i gona differentiate it?
Like my interest is play games , soccer , basketball , singing...
How am i gona seperate like soccer into an individual interest ?
Can we like use comma?
Also... if we use coma, when we do our select statement...
how shall we go bout doin it?
Please advice
It's not very clear what you really want. Do you want to filter records on some intrests (like every users that have interest soccer)?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You want rows, not comma sepearted values
CREATE TABLE myInterests99(UserId varchar(8), Interest varchar(25))
GO
INSERT INTO myInterests99(UserId,Inter est)
SELECT 'X002548','Skiing' UNION ALL
SELECT 'X002548','Hockey' UNION ALL
SELECT 'X002548','Tennis' UNION ALL
SELECT 'X002548','Margarittas'
CREATE TABLE myInterests99(UserId varchar(8), Interest varchar(25))
GO
INSERT INTO myInterests99(UserId,Inter
SELECT 'X002548','Skiing' UNION ALL
SELECT 'X002548','Hockey' UNION ALL
SELECT 'X002548','Tennis' UNION ALL
SELECT 'X002548','Margarittas'
ASKER
Dear aoreshkova..
yes!
Thats wat i m looking for..
like select * who like soccer!
:)
DOes that means my select statement need to use LIKE '%soccer%'
what does % means?
X002548... i will try out ur method!
:)
yes!
Thats wat i m looking for..
like select * who like soccer!
:)
DOes that means my select statement need to use LIKE '%soccer%'
what does % means?
X002548... i will try out ur method!
:)