Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding Last Dash Number
Message
 
To
16/07/2007 09:46:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01240664
Message ID:
01240746
Views:
12
I'm not exactly sure if you are asking us how to find the last set of digits following the last dash .. or if you are asking for us to help you witht he SQL statement to combine the like numbers and find the highest dash number.

But .. if you are just asking how to find the last set of numbers when there could be unknown numbers of dashes and unknown length of digits, this would work:
? SUBSTR(Somefield,RAT('-', Somefield)+1)
>I need a Select statement to find the last dash number in a series of partnumbers. Each record in my table has a unique sequence number. The table contains all partnumbers. The greatest sequence number represents the last partnumber that was entered and thus will be the last or greatest dash number for that series. So I need to isolate a series of partnumbers, records where the first six numbers are the same, then figure out from the dash suffixs(-401, -403, -405) which is the greatest.
>
>The table is accessed remotely by SPT.
>
>This is needed to control what the next dash number the user can create is.
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Reply
Map
View

Click here to load this message in the networking platform