开发者

How do I JOIN lines into single line returned from SQL in one column?

开发者 https://www.devze.com 2023-02-15 22:51 出处:网络
Im trying to run the sql such as: select \'TransactionId=\'|| ||\',USER_DATA=\'|| from bla..bla. the problem here is that the userdata () has very long v开发者_Go百科alues and results are shown as i

Im trying to run the sql such as:

select 'TransactionId='|| ||',USER_DATA='|| from bla..bla.

the problem here is that the userdata () has very long v开发者_Go百科alues and results are shown as in the notepad ( and even very deterioted in excel):

TransactionId=12385031681, USER_DATA=This product

brought to you by

P&G SMS, < coumn3 > ...bla.bla

Now, i need to fix the value fetched in USER_DATA into one line rather than number of lines.

Can you please advise ?


Try to remove line breaks with replace:

replace(replace(USER_DATA,chr(10),''),chr(13),'')
0

精彩评论

暂无评论...
验证码 换一张
取 消