Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello:

I have a SQL statement and I need to suppress all the info from the rows, such that there is a substring, and it is separated by a "|" character.

Do you know how to do this?

Here's my statement:

select distinct FILE_NAME, MESSAGE_TEXT from message_header H
where substr(msg_date,1,4) ='2021'



Query Works, just need to supress some lines from MESSAGE_TEXT which is delimited by several rows of output per row with a "|" character.

Thank you,
Michele

What I have tried:

select distinct FILE_NAME, MESSAGE_TEXT from message_header H
where substr(msg_date,1,4) ='2021'
Posted
Updated 20-Sep-21 6:52am

1 solution

Have a look at this: Converting comma separated data in a column to rows for selection[^] It doesn't do exactly what you want, but it should give you some ideas.

If it doesn't, you are going to have to give us a lot more info - including samp
le input and output data, along with a better idea of exactly what you tried and why it didn't work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900