I am trying to build a query to do a trim function from the right. The table I am working with has over 44,000 records and the field I want to do the trim on has several different character varitons ending in the value.
Any example as to how I can put in a module:
- code that will trim from the right
- an if statement somehow that will look for "YES" at the end, "NO" at the end, "Y" at the end, "N", etc....
EXAMPLES: SCHEDULEDREMOVALYN-Y ---- to result "SCHD"
SCHEDULEDREMOVALYN-N ---- to result "UNS"
SCHEDULEDREMOVALYN- ---- to result "SCHD"
SCHEDULEDREMOVALYN-NO --- to result "UNS"
SCHEDULEDREMOVALYN-YES -- to result "SCHD"
Then somehow call the module in the query to show result per record or for each aircraft part removed.
What I am trying to do is clean up this field and get a result all at once instead of building 5 more action querys to get the data to work for me.
Any killer moves out there??
Thanks a million in advance!!
jw
Any example as to how I can put in a module:
- code that will trim from the right
- an if statement somehow that will look for "YES" at the end, "NO" at the end, "Y" at the end, "N", etc....
EXAMPLES: SCHEDULEDREMOVALYN-Y ---- to result "SCHD"
SCHEDULEDREMOVALYN-N ---- to result "UNS"
SCHEDULEDREMOVALYN- ---- to result "SCHD"
SCHEDULEDREMOVALYN-NO --- to result "UNS"
SCHEDULEDREMOVALYN-YES -- to result "SCHD"
Then somehow call the module in the query to show result per record or for each aircraft part removed.
What I am trying to do is clean up this field and get a result all at once instead of building 5 more action querys to get the data to work for me.
Any killer moves out there??
Thanks a million in advance!!
jw