I have a View in Ms SQL Server. It displayes data events. Every row has BatchNumber,…
- User
I have a View in Ms SQL Server. It displayes data events. Every row has BatchNumber, EventType, EventDT columns. I need to do a specific filtration for this View. For every BatchNumber , for every event with EventType = A find next event , and if EventType = B then dont show this next event (with EventType = B).
- Assistant
To achieve your requirements based on the events you have in your view in SQL Server, you'll want to create a query that captures the logic for filtering events accordingly. This means you need to identify the next event for each
BatchNumberwhere the current event's is , and ensure to exclude the next event if its is .