Code :
- CASE
- WHEN PATINDEX('%NumberOfItems[[]%', A_History) > 0
- THEN substring(A_History,PATINDEX('%NumberOfItems[[]%', A_History) + 14, CHARINDEX(']', A_History,CHARINDEX('NumberOfItems[', A_History,0))-CHARINDEX('NumberOfItems[', A_History,0)-14)
- ELSE 'N/A'
- END
- as NumberOfItems,
- CASE
- WHEN PATINDEX('%TypeOfItems[[]%', A_History) > 0
- THEN substring(A_History,PATINDEX('%TypeOfItems[[]%', A_History) + 12, CHARINDEX(']', A_History,CHARINDEX('TypeOfItems[', A_History,0))-CHARINDEX('TypeOfItems[', A_History,0)-12)
- ELSE 'N/A'
- END
- as TypeOfItems,
- CASE
- WHEN PATINDEX('%ReasonForDeletion[[]%', A_History) > 0
- THEN substring(A_History,PATINDEX('%ReasonForDeletion[[]%', A_History) + 18, CHARINDEX(']', A_History,CHARINDEX('ReasonForDeletion[', A_History,0))-CHARINDEX('ReasonForDeletion[', A_History,0)-18)
- ELSE 'N/A'
- END
- as ReasonForDeletion
|