Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2006

Tip: Looking for answers? Try searching our database.

Left

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rollover99 - 26 May 2006 17:54 GMT
I have searched many threads to try and find an answer.  I have a field that
has
many alpanumeric values in it.

Like SO12345 or PO54321  

I am trying to get just remove the text from number in a query.
Field1         Field2
SO               12345
PO               54321

I have used this and get the Field1 but I am at a loss for field2

Left(dbo_INVOICE!SALESORDERNUMBER,InStr(dbo_INVOICE!SALESORDERNUMBER,"SO")-1)
Rick B - 26 May 2006 18:01 GMT
If the field is always the exact length and format you indicate, then use...

Left([YourField],2)

and

Right([YourField],5)

Signature

Rick B

>I have searched many threads to try and find an answer.  I have a field
>that
[quoted text clipped - 11 lines]
>
> Left(dbo_INVOICE!SALESORDERNUMBER,InStr(dbo_INVOICE!SALESORDERNUMBER,"SO")-1)
rollover99 - 26 May 2006 18:29 GMT
The left command works but the right gives me the last 2 numbers and the
right may change in length.

So pretty much I have the first 2 letters removed into Field1 but Field2
needs to just show everything else and with using

Right([myfield],5) only returns the last 2 numbers.
rollover99 - 26 May 2006 18:32 GMT
Got it.

Thanks for all your help on this.

The number by default has 8 numbers and I just increased the number to
facilitate this.

End result  Right([myfield],8)
Tom Lake - 26 May 2006 18:24 GMT
>I have searched many threads to try and find an answer.  I have a field
>that
[quoted text clipped - 11 lines]
>
> Left(dbo_INVOICE!SALESORDERNUMBER,InStr(dbo_INVOICE!SALESORDERNUMBER,"SO")-1)

Mid(dbo_INVOICE!SALESORDERNUMBER, 3)

Tom Lake
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.