Nov 9, 2005 #1 cantab55 MIS Nov 9, 2005 1 US I have a memo field comprised of words, numbers, etc. and I want to return only the last word as the value in a report I am running.
I have a memo field comprised of words, numbers, etc. and I want to return only the last word as the value in a report I am running.
Nov 9, 2005 #2 lbass Technical User Feb 9, 2002 32,818 US If you are using version 9.0 or higher, you should be able to use a formula like: split(trim({table.memo})," ")[ubound(split(trim({table.memo})," ")] Otherwise, you would need to create SQL expressions like: [{%first254}:] (substr(table.`memo`,1,254)) [{%second254}:] (substr(table.`memo`,255,254)) Then create a formula like the following: if isnull({%second254}) then split({%first254}," ")[ubound(split({%first254}," "))] else split({%second254," ")[ubound(split({%second254}," "))] -LB Upvote 0 Downvote
If you are using version 9.0 or higher, you should be able to use a formula like: split(trim({table.memo})," ")[ubound(split(trim({table.memo})," ")] Otherwise, you would need to create SQL expressions like: [{%first254}:] (substr(table.`memo`,1,254)) [{%second254}:] (substr(table.`memo`,255,254)) Then create a formula like the following: if isnull({%second254}) then split({%first254}," ")[ubound(split({%first254}," "))] else split({%second254," ")[ubound(split({%second254}," "))] -LB