Re: SQL Query Help
- From: "Arnie Rowland" <arnie@xxxxxxxx>
- Date: Sun, 19 Nov 2006 15:07:02 -0800
I believe that one of these resources will point you in a direction that
will work for you:
Lists -Field Concatenation
http://groups.google.com/group/microsoft.public.sqlserver.programming/msg/2d85bf366dd9e73e
Lists -Field Concatenation ( For SQL 2000 & 2005 )
http://groups.google.com/group/microsoft.public.sqlserver.programming/msg/7e5b4c8a9b9b968a
Lists -Field Concatenation, One Field to Itself for string
SQL 2000
http://omnibuzz-sql.blogspot.com/2006/06/concatenate-values-in-column-in-sql.html
SQL 2005
http://sqlblogcasts.com/blogs/tonyrogerson/archive/2006/07/06/871.aspx
http://www.projectdmx.com/tsql/rowconcatenate.aspx
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Hotmail" <Hotmail@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1698075B-E076-4749-AD8A-B4F3F66AD2C2@xxxxxxxxxxxxxxxx
I am a bit of a newbie to SQL Queries and need some help with the following
query.
I have two tables in SQL 2000 which hold info about user and roles.
In the first table I have a set of user info containing the user name and
its email address. the user name is the primary key in this table.
In the second table I have a set of role information which contains the
role
name, role email address and a reference to the user who holds that role.
The
user can be a member of many roles so he can be referenced in the roles
table
maultiple times.
What I want is to output is an ammalgameted view of this data keyed on the
user name as follows:-
user1, user1 email address, role1 email address, role2 email address ...
user2, user2 email address, role3 email address, role4 email address...
I created a basic select qury between the two tables but it only produced
the records on a separate row each. How can I get the multiple roles to
link
to the user in a single row?
Thanks
Hotmail
.
- Prev by Date: Re: query
- Next by Date: MS Access query
- Previous by thread: Re: Set default for null values in unmatched rows of left join
- Next by thread: MS Access query
- Index(es):
Relevant Pages
|
|