I'm looking for a little help in splitting apart a field that uses multiple delimiters in a sql function/ statement. I've followed a few examples already listed HERE
here that work very well with a single delimiter. However I need to split apart a field that is based on the following. its format would be qty x itemno description, qty x itemno description, etc. I therefore need to break apart the statement on the first ' x' the second space ' ' and the final comma.. I figure I can split this based on a regular expression statement but unsure about how to go about it..
could anyone help?
    OnSameLine = substring( ( SELECT ', ' + 
                 coalesce (CAST(CNT.qty AS varchar(1000)), '') +                  
                 ' x ' + '['+ coalesce (CNT.Itemno,'') + ']' + 
                 ' ' + coalesce (STK.Desc#1,'')
format I need..
PK qty itemno description
PK qty itemno description 
etc..
 
     
     
    