Home » SQL & PL/SQL » SQL & PL/SQL » i need result in concat ,manner (oracle 9i)
i need result in concat ,manner [message #313600] Sun, 13 April 2008 22:30 Go to next message
Messages: 6
Registered: April 2008
Junior Member


i have three tables

one table user have usernames
sample data
username password
user1 password1
user2 password2

second have roles table
roleid rolename
1 role1
2 role2
3 role3
4 role4
and third have usersrolesrel table having relation
user1 1
user1 2
user2 3
user2 4

now i need query result as
username roles
user1 role1,role2
user2 role3,role4

any suggesstions appritiated
Re: i need result in concat ,manner [message #313602 is a reply to message #313600] Sun, 13 April 2008 22:32 Go to previous messageGo to next message
Messages: 24963
Registered: January 2009
Location: SoCal
Senior Member
>any suggesstions appritiated
Read & FOLLOW posting guidelines as stated in URL above
Re: i need result in concat ,manner [message #313614 is a reply to message #313600] Sun, 13 April 2008 23:40 Go to previous message
Barbara Boehmer
Messages: 8612
Registered: November 2002
Location: California, USA
Senior Member
You can join your second and third tables and use any one of various string aggregation methods. If you search this site for things like stragg and concat_all, you should find various examples.
Previous Topic: Order by is killing performance
Next Topic: sql query help
Goto Forum:

Current Time: Wed Oct 26 00:00:06 CDT 2016

Total time taken to generate the page: 0.06782 seconds