Hi! I used this Merge multiple rows based on id and display in one row using SQL Server. But I want show result below.In ProductTable I have Parametr for define year. Only for DatePlanNext Parametr is 1 for other is 0. How I can get below result?
Id
PREDATE
PREPRODUCT
DateSaller
Name
DatePlanNext
NextProduct
1
09.09.2015
Melon
09.09.2017
2
09.10.2016
Potato
3
10.10.2016
Tomato
10.10.2017
4
Cucumber
5
12.11.2017
Onion
12.11.2018
6
07.02.2016
Cherry
Firuz says: But I want show result below.In ProductTable I have Parametr for define year. Only for DatePlanNext Parametr is 1 for other is 0.
But I want show result below.In ProductTable I have Parametr for define year. Only for DatePlanNext Parametr is 1 for other is 0.
explain above statement in more detail. If possible explain with an example.
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.