1

I have a question on how to display a specific value within a string inside a column:

Bin Message Sent
X343 Message is 333-Yes No
VFG33 Content Value on 155-Yes Yes
JH789 Bring to Dock33 at 045-Yes Yes
1255 Message is 768-Yes No

As you can see, I have a table as above that shows a BIN, a message from an external system and if the message is sent. What I was wondering is if there is anyway to say, if the Sent column says "Yes", then ONLY display the numerical value in the Message Column. Hopefully this makes sense, I apologize for any confusion.

Edit:

So then my outcome would look like this:

155, 045

lostcoder
  • 11
  • 4
  • 1
    In the 3rd example, assuming you want 045 and not 33045, right? Also, which dbms? And is the format of the message always the same... ie, the last 7 characters include a 3-digit number you want, then a hyphen, then the word 'yes'? If so, you can use a left(right(message, 7),3). – Isolated Oct 14 '21 at 18:22
  • 1
    Sample data is great, but you should also _specify_ the expected result. – jarlh Oct 14 '21 at 19:03
  • @lostcoder you might want to encourage people to help you by accepting answers too. You have asked 18 previous questions, 17 of which have 1 or more answers, none are marked as accepted. Accepting good answers is important. It means users looking for answers won't ignore those on your questions, your reputation will increase (along with permissions) and the people who have spent their valuable time trying to help you are recognised. – Alan Schofield Oct 15 '21 at 11:54

0 Answers0