Loading ...
Sorry, an error occurred while loading the content.

4500RE: UPDATE question

Expand Messages
  • John Warner
    Apr 6, 2010
    • 0 Attachment
      First thanks again to all for the suggestions on the UPDATE query
      yesterday. Works like a charm. But another small problem has popped up and
      I think this is in SQL Server.

      One of the fields I hit with my subqueries in the UPDATE is a Name column
      (vendors) and some of the names have the '&' sign in them such as
      John & Warner, Inc

      The SELECT:

      SELECT Vendor_or_Mfg + ', ' as 'data()'
      FROM [Table_4(Vendor_or_Mfg)] t4
      WHERE t4.F_documentID=t.F_documentID
      FOR XML PATH('')) Vendor_or_Mfg

      I get John & Warner, Inc

      I need the & but not the amp. I know the XML is doing this, anyway to make
      it 'stop' or a simple way without a cursor to pass through the rows
      returned and replace & with just &? Set preferred to procedural process
      is what I'm after.

      John Warner
    • Show all 18 messages in this topic