WHERE Upper(Session) Like "%" + Upper(Alltrim(lcValue)) + "%" ;>I have a procedure that helps find certain events. I use a select statement to identify which events are to be searched. For example I need "Top Fuel" and it looks up anything with "Top Fuel" in the first part of the field.
> > >Local yourselection, yourselectionwithlesscharacters, lcValue > >lcValue = 'Top Fuel' > >yourselection = '"' + Upper(Alltrim(lcValue)) +'%"' > >Select Dist Session,.F. As initialck ; > FROM icard ; > WHERE UPPER(Session) Like &yourselection ; > ORDER By Session Desc ; > INTO Cursor csrListSession Readwrite > >If _Tally > 0 > ** Call form method that checks or unchecks the list depending on which class is run > Thisform.check_qualifying_lists() >Else > ** WE DID NOT find any records so lets > ** lower the character count to see if we get > ** at hit on the first 11 characters > yourselectionwithlesscharacters = Left(Upper(Alltrim(lcValue)),11) > yourselection = '"' + yourselectionwithlesscharacters +'%"' > Select Dist Session,.F. As initialck ; > FROM icard ; > WHERE Upper(Session) Like &yourselection ; > ORDER By Session Desc ; > INTO Cursor csrListSession Readwrite > > If _Tally > 0 > * Call form method that checks or unchecks the list depending on which class is run > Thisform.check_qualifying_lists() > > Else > > > ** Now one last attempt at 5 characters > ** if this does not work then give up > yourselection = LEFT(Upper(Alltrim(lcValue)),5) > > * this is where I need help with finding any records that Contain Top Fuel anywhere in the text. > > Select Dist Session,.F. As initialck ; > FROM icard ; > WHERE SUBSTR(Upper(Session),AT(yourselection,Upper(Session)),LEN(yourselection)) = yourselection ; > ORDER By Session Desc ; > INTO Cursor csrListSession Readwrite > If _Tally > 0 > BROWSE > * Call form method that checks or unchecks the list depending on which class is run > * Thisform.check_qualifying_lists() > > Else > > ** nothing found let them know > MESSAGEBOX("Sorry, No Records Found for this Class",0,"NO Records Exist") > > Endif > Endif >Endif > > > >>