Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
18%
200 - 500 GB
28%
500 - 800 GB
3%
800 - 1200 GB
7%
1200 - 1500 GB
7%
1500 - 2000 GB
13%
> 2000 GB
24%
Total votes: 71

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 11th July 2019, 05:57
bondol_hendra bondol_hendra is offline
Junior Member
 
Join Date: Aug 2016
Posts: 3
bondol_hendra is on a distinguished road
Baan: 10.3 - DB: SQL Server - OS: Windows 2012 R2
string get last characters
Baan: Other/Unknown
C/S: None/Unknown

Hello,

I need to get last characters.
example :
1. "ASSDEFTR"
2. "QWEETYOORE"
3. "RSTUDS"

I need value :
1. "FTR"
2. "ORE"
3. "UDS"

If i using STRING(6,3),
number 1 is not problem. but if number 2 I can get value "YOO" not "ORE"

how to get last character?
sorry if my question not good.
thanks.
Reply With Quote
  #2  
Old 11th July 2019, 06:43
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,381
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi,


Use len() function to calculate total length and then taken last 3 using something like this -



Code:
 long ls 

     string seqstr(100) 

    seqstr = "LONDON" 

    ls = len(seqstr) 

    seqstr = seqstr(ls-2;3) | seqstr now stores the last 3 characters of the string which is "DON" 
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #3  
Old 11th July 2019, 10:00
bondol_hendra bondol_hendra is offline
Junior Member
 
Join Date: Aug 2016
Posts: 3
bondol_hendra is on a distinguished road
Baan: 10.3 - DB: SQL Server - OS: Windows 2012 R2
Quote:
Originally Posted by bhushanchanda View Post
Hi,


Use len() function to calculate total length and then taken last 3 using something like this -



Code:
long ls
string seqstr(100)


seqstr = "LONDON"
ls = len(seqstr)
seqstr = seqstr(ns-2;3) | seqstr now stores the last 3 characters of the string which is "DON"
thanks. i will try it.
but "seqstr(ns-2;3)" this is "ns" or "ls"?
i am make sure it.
Reply With Quote
Sponsored Links
  #4  
Old 11th July 2019, 11:16
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,381
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Yup. Sorry for the typo. Corrected.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #5  
Old 11th July 2019, 11:53
OmeLuuk's Avatar
OmeLuuk OmeLuuk is offline
Guru
 
Join Date: Mar 2002
Location: The Netherlands
Posts: 1,085
OmeLuuk is on a distinguished road
Baan: Infor LN 6.1 10.2.1 - DB: MS SQL2008 - OS: VM WindowsServer2008R2
And to be sure you do not end up with spaces in a fixed string, you can use
seqstr = seqstr(len(strip$(seqstr))-2;3)
__________________
Also read Luke 24:4-8
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Question mr_suleyman Tools Development 37 11th November 2016 08:14
DEV: Export any Baan table to (proper) Excel Francesco Code & Utilities 27 2nd September 2011 14:00
Help regarding tools session rahul.kolhe22 Tools Development 4 22nd January 2010 13:31
problems with stpapi.zoom.option Finnigan AFS/DDC/OLE: Function servers 5 3rd November 2009 14:04
File Browser Bogdan Tools Development 52 7th January 2004 08:17


All times are GMT +2. The time now is 06:57.


©2001-2018 - Baanboard.com - Baanforums.com