troubleshooting Question

Looking to get a count of procedural steps in an sql view

Avatar of Will
WillFlag for United States of America asked on
Microsoft SQL ServerSQL
2 Comments1 Solution64 ViewsLast Modified:
I am doing a rank over partition in an attempt to get a unique count of procedural steps.  the problem is the partition field is not unqiue, and I am trying to increment the step:  Here is a sample from the data:

Sample Data
the approach I am using is:

case when Type='Procedure' then rank() OVER (partition by Type ORDER BY ActionDate) end as PSeq, 

I understand why the 5 is repeating because I am using actiondate and the two dates are the same.

Any thoughts how I can get around this since the second 5 needs to be a 6.

Thank you!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros