diteps06
asked on
Concatenate values of a column
I have a table Company with columns like Phone_Num, Fax and email where they can have multiple values.
These values should be return in a single row.
The table below shed more light on the scenario
Company | Phone_Num | Fax | email
AG 0345 45 ab@rt.com
AG 0378 47 ab@rt.com
GB 0256 34 gb@rt.com
GB 0298 34 gb2@rt.com
RD 0449 67 rd@rt.com
I would the result of my query be
Company | Phone_Num | Fax | email
AG 0345,0378 45,47 ab@rt.com
GB 0256,0256 34 gb@rt.com,gb2@rt.com
RD 0449 67 rd@rt.com
I am thinking of creating a function given the name of the company, it returns a
string in the pattern the "Phone_NUm#Fax&email". Using string functions like substring and length
I would split it in the respective variables.
My problem is how can I create the oracle function.
Any help would be welcome.
These values should be return in a single row.
The table below shed more light on the scenario
Company | Phone_Num | Fax | email
AG 0345 45 ab@rt.com
AG 0378 47 ab@rt.com
GB 0256 34 gb@rt.com
GB 0298 34 gb2@rt.com
RD 0449 67 rd@rt.com
I would the result of my query be
Company | Phone_Num | Fax | email
AG 0345,0378 45,47 ab@rt.com
GB 0256,0256 34 gb@rt.com,gb2@rt.com
RD 0449 67 rd@rt.com
I am thinking of creating a function given the name of the company, it returns a
string in the pattern the "Phone_NUm#Fax&email". Using string functions like substring and length
I would split it in the respective variables.
My problem is how can I create the oracle function.
Any help would be welcome.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Is there a method to use the STRAGG function without the group by clause.