Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a data show as below, I'm expecting output as below.
Products Expected_output
Boat Boat
Boat 2022 Boat
Apple fruit Apple fruit
Apple fruit 2023 Apple fruit
Apple2fruit Apple2fruit
Apple2fruit 2022 Apple2fruit
p2p p2p
p2p 2022 p2p
if it has number(basically the number is year, year can be any year irrespective of what it is showing above) in last four digits it's should not show,
Can anyone please help me on this. thanks in advance.
Assuming year is always separated by empty space:
if(right(field, 1))>=0, left(field,length(field)-5), field) as NewField