Hi Darren,
If I got you right, you want to remove the line breaks of a multi lined cell (see screen shot)? BTW: this could also be the multi lined content of an object variable in the "Variables" tab of the job...
I opted for Powershell because this solution is more future safe as it doesn't rely on the database schema to be unchanged:
Cheers
Christoph
------------------------------
----------------------------------------------------------------
Automic AE Consultant and Trainer since 2000
----------------------------------------------------------------
------------------------------
Original Message:
Sent: 02-17-2020 04:18 PM
From: Darren Sniezak
Subject: Multi-Line Variable: Removing the Line Breaks
Recently a question was posed about how to best handle a multi-line variable and removing the line breaks: these aren't line breaks that UC_CRLF will capture, so we got a little more creative.
While there's multiple methods to do this, I opted for using a SQLI variable to regex the actual content in the DB directly:
select REGEXP_REPLACE(OVW_VALUE1,'[[:space:]]',' ') from OVW where OVW_OH_IDNR in (select oh_idnr from oh where oh_name = 'VARA.TEST.NEWLINE') and OVW_VValue = 'KEY'
The Value1 would be changed to match the column containing the value to be parsed, but this worked without major hiccups. Originally I didn't use :space: and instead used E'[\\n\\r\\u2028]+' but Oracle didn't like that quite as much.