473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

LEFT() problems

I need to get the right end of a field. Really what i want is
everything after 7 characters in.

so if the field is 123456789
i would return 89

I can't use right([field]) since i don't know how many characters the
field will be.

any help

tia,
KO
Apr 2 '08 #1
3 1198
turtle <ko****@vistacontrols.comwrote in news:f722ab6f-ae0e-4d07-85dd-
68**********@u69g2000hse.googlegroups.com:
so if the field is 123456789
i would return 89
Mid$("123456789", 8)
Apr 2 '08 #2
You can use the Len function to return the length of the original string,
subtract 7 from it, and use that as the length field of a Right command, but
Lyle's approach is simpler, and likely faster (though any code execution is
likely to be so much faster than disk operations that shaving a few
nanoseconds or microseconds isn't going to make a visible difference to the
user watching the screen.

Larry Linson
Microsoft Office Access MVP

"turtle" <ko****@vistacontrols.comwrote in message
news:f7**********************************@u69g2000 hse.googlegroups.com...
>I need to get the right end of a field. Really what i want is
everything after 7 characters in.

so if the field is 123456789
i would return 89

I can't use right([field]) since i don't know how many characters the
field will be.

any help

tia,
KO

Apr 2 '08 #3
DFS
turtle wrote:
I need to get the right end of a field. Really what i want is
everything after 7 characters in.

so if the field is 123456789
i would return 89
SELECT Mid(Field,8) as Remainder
FROM Table

I can't use right([field]) since i don't know how many characters the
field will be.

any help

tia,
KO

Apr 2 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Eric | last post by:
Hi Folks, Lets assume I have three tables. Their layout is as follows. Please note that tblPeople does not have an entry for Denver (this is my problem) tblCity _________________ CityName ...
3
by: Saku | last post by:
Greetings, I'm having problems with correct rendering of an aligned image and list items. The following test page demonstrates the issue: ----------clip---clap---clip---clap---------- <html>...
10
by: Anders Wegge Jakobsen | last post by:
Hi, I'm playing around with a layout for a weblog. A mockup can be seen at <http://outside.bakkelygaard.dk/~wegge/testblog/index.html>. The page has a fixed width of 800px, so I'm perfectly...
4
by: Chris Sharman | last post by:
I've a very simple page (intranet, but moved to http://services.ccagroup.co.uk/dtest.html for you - so the links are all broken). essentially it's just a list of links. I've split it into two...
3
by: Dam | last post by:
Using SqlServer : Query 1 : SELECT def.lID as IdDefinition, TDC_AUneValeur.VALEURDERETOUR as ValeurDeRetour FROM serveur.Data_tblDEFINITIONTABLEDECODES def,...
17
by: Nathan Given | last post by:
Hello All, I am trying to debug a broken query. The query uses Left$(,4) instead of Left(,4). What is the difference between the Left() and Left$() functions in Microsoft Access? Thanks!...
7
by: deko | last post by:
SELECT tblTxAcct.TxAcctName, tblTxType.TxTypeName, Nz(qryTxAcctListCt.TxCount, 0) AS TxCt FROM (tblTxAcct INNER JOIN tblTxType ON tblTxAcct.TxType_ID=tblTxType.TxType_ID) LEFT JOIN qryTxAcctListCt...
3
by: Andi Twine | last post by:
Hi all, I really hope someone here can help ! I have designed and built an ASP.NET web service with Visual Studio .NET. The web service outputs some dummy XML data when its called with some...
18
by: Jm | last post by:
Hi all I feel stupid for asking this, but i just went to use the left() function from vb6 only to find it doesnt do what it used to under .NET. Im assuming theres something else now im meant to...
6
by: Ed Dickerson | last post by:
How do I get my list items to be flush left? I've got list-style-type: none; to get rid of the bullets, but I can't pull the list over to the left. There's still a gap for the invisible...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.