I’m looking for a query to change the DocNum(image) when my MDK column becomes zero with order by idn4
whats right query for my qestion
SELECT [idn4],[MDK],
CASE
WHEN [MDK]<>0 THEN Row_number() OVER (ORDER BY [idn4])
ELSE NULL
END AS DocNum
New contributor
manoochehr gharooni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.