Forum Discussion
SQL - removing data
Hi Pravin Wattamwar,
Thank you for your response, however the struggle isnt to create a measure or an extra column, but to do it via the SQL.
The issue is that i would prefer to have it removed via the SQL, as the SQL is used multiple places.
By doing that i can avoid having to create a measure in every report.
So you need SQL of this?
simply update where clause
where style_number not in (Value1,value2)
and date not in ("value1","value2")
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
- imlaug6 years agoFrequent Visitor
But wouldnt that remove the 2 days completely?
I only need to remove the figures for those 2 styles on those 2 days. i still want all other data from those 2 days.
Does it make sense?
- Anonymous6 years agoNot applicable
then simply create cte
;with cte as(
Select
Case when style_number in (value1,value2) and date in (value1,value2) then null else style_number end as [style number]
from table
)
select * from cte where [style number] is not null
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.- imlaug6 years agoFrequent Visitor
It seems more like a solution that i am looking for, however, i am still a rookie at SQLs, so i dont really know how to put it in. Can you show me how to put it in, in relation to the SQL i posted? 🙂
And thank you!