sql server 2008 - How do i merge multiple rows data in one row in t-sql but string and numeric both -
sql server 2008 - How do i merge multiple rows data in one row in t-sql but string and numeric both -
data next :
code article amount paid balance 8001 black 8000 7000 1000 i want see this:
8001 (black) (1000)
i think need.
note : if want concatenate numeric datatype info varchar data first have convert numeric data varchar type else may conversion failed error.
select convert(varchar(30), code) + ' (' + article + ') (' + convert(varchar(30), balance) + ')' new_column, article, amount, paid, balance <tablename> sql-server-2008 tsql
Comments
Post a Comment