hello, i found this site very helpuf and maybe someone can help me.
i have a table in which i need to search for those opprtunities that have PL=HA and need to put "1" in the column[HA]. Lets say that the column HA is empty.
my problem is that if the opportunities repeat i need to put "1" even if on raws they dont have the PL=HA.
for example the opprtunity OPE-0007525935, repeats 3 times but it only has on 1 raw HA at PL. i need to fill with "1" for all 3 raws.dont take into consderation the "YES" filling in thsi column. at the end i will need to replace 1 with yes.
i have tried this:
select [HPE Opportunity Id],[PL], case when [PL]='HA' then count([HPE Opportunity Id]) over (partition by [HPE Opportunity Id],[PL]) else ' 'end as valoare from table
but it doest populate the HA column as i want. For this opprtuity it puts 1 only on the raw that has HA at PL, the rest are 0.
Maybe someone has an ideea, i would really appreciate.