Home Analyst Portal

SQL - Getting a Service Request priority in ServiceManagement

Zackary_SlatesZackary_Slates Customer IT Monkey ✭
Hello All,

When returning IR's and SRs from the WorkItem table I'd like to output Priority.  With SR's it gives me a GUID and with IR's it gives me a number.  SQL gets angry (types in red characters back at me!) when I join the Display table's ElementID field to the WorkItem's PriorityID field (Conversion failure...character string to uniqueidentifier).  I get why, but not sure the best way to work around this.

I'd ultimately like to have nice join solution, but realize this could be accomplished by a using Case and a subquery...

FYI I tried casting/converting to a uniqueidentifier hoping it would fill in the gaps for the IR's...no luck...must be the right length and correct format.

Any thoughts?

Best Answers

  • Zackary_SlatesZackary_Slates Customer IT Monkey ✭
    Answer ✓
    Thanks!!! TRY_Convert...Yay new tool and it works perfectly.  Thanks!

Answers

  • Zackary_SlatesZackary_Slates Customer IT Monkey ✭
    Answer ✓
    Thanks!!! TRY_Convert...Yay new tool and it works perfectly.  Thanks!
Sign In or Register to comment.