I want to merge rows from one table to another row in another table
Always value of the “amount” relating to the “name” is more than 10, but split into several pieces
If the value of the “amount” column is less than 10
collect all smaller than 10
bring together the values of the column “description”
where has the same name
My goal is to not exist row “amount” below 10 in the new table
aka
I want this form table – ‘table’
id(1) name(Name1) description(Description1) amount(5.50)
id(2) name(Name1) description(Description2) amount(5.50)
id(3) name(Name2) description(Description1) amount(3.50)
id(4) name(Name2) description(Description1) amount(3.50)
id(5) name(Name2) description(Description2) amount(3.50)
id(6) name(Name3) description(Description3) amount(10.00)
become in to this in a new table – ‘newtable’
Newid(1) name(Name1) description(Description1,Descripton2) amount(11.00)
Newid(2) name(Name2) description(Description1,Description1,Descripton2) amount(10.50)
Newid(3) name(Name3) description(Description3) amount(10.00)
Any ideas?
You can use
group by,group_concatandsumfor that.Here’s little sample:
BTW, I forgot to ask: What have you tried?