Excluding row based on trailing text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know it's going to be a real simple answer but I'm trying to exclude
records based on the last three characters of an 11 character text string. I
want to show all records except those that contain "CM[and any number 1-9]"
It could be CM0 or CM1 or CM9 - I don't want to see any. I'm not sure if I'm
going in the right direction but this is what I tried to no avail:

Not Right([LERG 6].[Switch],3)="CM" & "*"

Any help would be appreciated.

Thanks,

Kevin
 
Kevin said:
I know it's going to be a real simple answer but I'm trying to exclude
records based on the last three characters of an 11 character text string. I
want to show all records except those that contain "CM[and any number 1-9]"
It could be CM0 or CM1 or CM9 - I don't want to see any. I'm not sure if I'm
going in the right direction but this is what I tried to no avail:

Not Right([LERG 6].[Switch],3)="CM" & "*"


You need to use the Like operator when using wildcards:

Not Right(LERG 6.Switch,3) Like "CM#"
 
I knew it was going to be easy and I was just forgetting something. Thanks
for the help!!!!

KG

Marshall Barton said:
Kevin said:
I know it's going to be a real simple answer but I'm trying to exclude
records based on the last three characters of an 11 character text string. I
want to show all records except those that contain "CM[and any number 1-9]"
It could be CM0 or CM1 or CM9 - I don't want to see any. I'm not sure if I'm
going in the right direction but this is what I tried to no avail:

Not Right([LERG 6].[Switch],3)="CM" & "*"


You need to use the Like operator when using wildcards:

Not Right(LERG 6.Switch,3) Like "CM#"
 
Back
Top