mibuso.com

Microsoft Business Solutions online community
It is currently Fri Jul 25, 2014 5:38 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Selectstr error: Same string in different case
PostPosted: Thu Jul 05, 2012 1:49 pm 
Offline

Joined: Wed Mar 07, 2007 4:52 pm
Posts: 15
Location: Germany
Country: Germany (de)
Unfortunately the SELECTSTR (String) function is not case sensitive. In a special case i had to do it with this custom function:
Code: Select all
pString is the comma separated string
pnumber is the sub string to select
i = Integer
lstrings = Integer
ltemptxt = Text

lstrings := STRLEN(DELCHR(pString,'=',DELCHR(pString,'=',',')))+1;
CASE pNumber OF
1:
  EXIT(COPYSTR(pString, 1, STRPOS(pString, ',')-1));
lstrings:
  BEGIN
    i :=1;
    ltemptxt :=pString;
    WHILE j < pNumber DO BEGIN
      ltemptxt := COPYSTR(ltemptxt ,STRPOS(ltemptxt ,',')+1);
      i +=1;
    END;
    EXIT(ltemptxt);
  END;
ELSE
  BEGIN
    i :=1;
    ltemptxt :=pString;
    WHILE i < pNumber DO BEGIN
      ltemptxt := COPYSTR(ltemptxt ,STRPOS(ltemptxt ,',')+1);
      i +=1;
    END;
    ltemptxt := COPYSTR(ltemptxt, 1, STRPOS(ltemptxt ,',')-1);
    EXIT(ltemptxt);
  END;
END;

Have fun.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: