title: how to select only some part of data from a table column in SQL SERVER
body: <p>i have created a SQL SERVER script . first of all please check the script </p>
  
  <pre><code>SELECT
    W.RequesterName + ' ' + +'on ' + CONVERT(varchar(20), W.Requested, 111) + ' ' + CONVERT(varchar(20), W.Requested, 108) + ' ' + (CASE
      WHEN DATEPART(HOUR, W.Requested) &gt; 12 THEN 'PM'
      ELSE 'AM'
    END) AS 'Request Detail',
    W.TakenByName,
    W.Reason,
    CONVERT(varchar(20), W.TargetDate, 111) + '   (' + CONVERT(nvarchar(max), CAST(W.TargetHours AS float)) + ')' + ' hr' AS targetWorkDetails,
    W.PriorityDesc + '/' + W.TypeDesc AS priorityDesc,
    W.SupervisorName,
    W.ShopID,
    W.RepairCenterName,
    W.RequesterPhone,
    A.Location3Name,
    A.ParentLocation,
    A.ParentLocationAll,
    W.AssetName,
    W.AssetName + '(' + CONVERT(nvarchar(20),w.AssetID,101) + ')' AS AssetDetails
  
  FROM WO W
  INNER JOIN AssetHierarchy A
    ON W.AssetPK = A.AssetPK
  WHERE w.WOPK = 10144 --INNER JOIN AssetHierarchy ON WO.AssetPK=AssetHierarchy.AssetPK   
  </code></pre>
  
  <p>and now please check my output </p>
  
  <p><a href="https://i.stack.imgur.com/SAStO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SAStO.png" alt="enter image description here"></a></p>
  
  <p>now please check the highlighted attribute which is 'ParentLocationAll' . my task is to get the ParentLocationAll data before <br> tag start . for example here in ParentLocationAll column we have value 'Wood Buffalo<br>Main Building' i would like to take only 'Wood Buffalo' . i would like to give one more example : suppose we have value 'calgery<br>abcd' in 'ParentLocationAll' column . then i have to take only 'calgery' instead of whole value . 
  i have tried hard but couldn't solve the issue . please help me with some good
  suggestion .thanks in advance .</p>