Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Character Search in Variable Length Field Post Reply Post New Topic
Author Message
Frank in VA
Groupie
Groupie
Avatar

Joined: 15 Nov 2007
Location: United States
Online Status: Offline
Posts: 46
Quote Frank in VA Replybullet Topic: Character Search in Variable Length Field
    Posted: 24 Feb 2017 at 4:11am
Hi All,
 I have a need to find a specific character in a variable length field.  This field ends with an account number, which is 10 digits long.  I need to report on all records that have an account number that begins with an '8'.  I've tried using the Right() Function with no success.  Since the field ends with the account number, the position I need to search on will always be in the 10th position from the end of the field.  Has anyone had to do a similar task?

Thanks in advance!
Frank
Frank
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Feb 2017 at 6:54am
mid({table.acctnum},len({table.acctnum})-9,1)='8'
IP IP Logged
Frank in VA
Groupie
Groupie
Avatar

Joined: 15 Nov 2007
Location: United States
Online Status: Offline
Posts: 46
Quote Frank in VA Replybullet Posted: 28 Feb 2017 at 8:54am
Seems to be working great.  Once again I thank you for your help!
 
Frank
Frank
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.