Hi
Allow me to wake this thread up again...
When using this:
select ISNULL(TRY_CONVERT(INT,SUBSTRING('Ejerskifte-45\Behandlet-45',
NULLIF(PATINDEX('%-[0-9]%','Ejerskifte-45\Behandlet-45'),0)
+ 1,LEN('Ejerskifte-45\Behandlet-45')) ),-1)
I get -1 I would like it to be 45