I have seen a few of these questions here but can't find something that applies to my code. Here is my snipet where I am getting the error:
left join
WORKQUEUE_INFO wqi
on wqi.WORKQUEUE_ID = SUBSTRING(hxcmt.hx_comment,CHARINDEX('[',hxcmt.hx_comment)+1,(CHARINDEX(']',hxcmt.hx_comment)-CHARINDEX('[',hxcmt.hx_comment))-1)
HX_COMMENT returns values like this:
'Deferred until 09/13/2022 12:00 AM CDT on workqueue ADMIN-CATCH ALL QUEUE [203]'
So what I am trying to do is join on the value in the brackets in HX_COMMENT (203 from the above value)
Any ideas why this might be failing?
1条答案
按热度按时间axr492tv1#
It becomes a small matter to trap/nullify zero values
Example
Results