LEFT() problems
am 02.04.2008 02:16:26 von Turtle
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
Re: LEFT() problems
am 02.04.2008 04:40:08 von Larry Linson
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" wrote in message
news:f722ab6f-ae0e-4d07-85dd-68395e4c5a34@u69g2000hse.google groups.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
Re: LEFT() problems
am 02.04.2008 06:13:35 von 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