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
raoexotic
Messages: 6
Registered: April 2008
Location: HYDERABAD
Junior Member

hi,

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
username
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
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>any suggesstions appritiated
http://www.orafaq.com/forum/t/88153/0/
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: 8635
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: Thu Dec 08 12:14:54 CST 2016

Total time taken to generate the page: 0.26215 seconds