question

octoberbb avatar image
octoberbb asked

How can I combine multiple rows into one in Sql query

I have these two tables when I join them I get this data: select table1.cust#, table1.custname,table2.name1,table2.description from table 1 join table1 on table1.dimvalue = table2.dimvalue Table 1 Table 2 Table1 Cust# Table1 CustName Table2 Name 1 Table2 Description 1000 ABC store LAC LegEnt 1000 ABC store 111 CostCtr 1000 ABC store Misc Channel 1000 ABC store US Region 2000 DEF Store LAC LegEnt 2000 DEF Store Misc Channel 2000 DEF Store US Region how can I get it to display like this. Cust# CustName Dimensions 1000 ABC Store LAC-111-Misc-US 2000 DEF Store LAC---Misc-US

sql query
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.