Clarity Service Management

Expand all | Collapse all

PDM_Load on Call_Req: Handle CRLF in description

Jump to Best Answer
  • 1.  PDM_Load on Call_Req: Handle CRLF in description

    Posted 05-18-2017 01:02 PM

    If you're running PDM_Load for the Call_Req table, how do you handle the "description" value when it has more than one line? It might be hard to see it here but there is a CRLF between 11:48 and SOLUTION.

     

    TABLE Call_Req
    external_system_ticket type active_flag
    category log_agent requested_by status group_id summary description

    { "HPOV:962730" ,"R" ,"1" ,"pcat:404101","U'0D74E711B6906745812ACB51801BD135'","U'0D74E711B6906745812ACB51801BD135'","CL" ,"U'64C899EE838C4440AD4099B422E3B7D1'","Test, Test D~R~TELEPHONE~Test, Test J~****W4RESPONSE 1/8" ,"R~TELEPHONE~Test, Darnell J~05-JAN-15~Test, Test, 01/08/2015 11:48
    SOLUTION" }



  • 2.  Re: PDM_Load on Call_Req: Handle CRLF in description
    Best Answer

    Posted 05-18-2017 03:36 PM

    use \\0012

    for example, "line1\\0012line2\\0012line3"



  • 3.  Re: PDM_Load on Call_Req: Handle CRLF in description

    Posted 05-18-2017 04:46 PM

    Thanks. That worked.  For the archives...

     

    I used pdm_extract to generate a file with an existing multiline field and looked at that output. PDM_Extract will generate the file with the \\0012 already there, answering my original question.

     

    I have the source for my pdm_load file temporarily stored in a SQL Server repository for data manipulation before generation (so I'm not using PDM_Extract here).  I ran the following against that column before generating the load file and it loaded.   Note, I am completely removing the LF before replacing the CR with \\0012 since the LF and CR are technically two separate characters. 

     

    UPDATE [dbo].[MigrationTable]

    Set DETAIL_TEXT = Replace(DETAIL_TEXT,Char(10),'')

     

    UPDATE [dbo].[MigrationTable]

    Set DETAIL_TEXT = Replace(DETAIL_TEXT,Char(13),'\\0012')

     

    If anyone wants to make me chuckle, point me to the KB explaining that \\0012 thing, because I looked before asking.



  • 4.  Re: PDM_Load on Call_Req: Handle CRLF in description

    Posted 05-27-2017 07:28 PM