469,275 Members | 1,835 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

how to run a substring query in ACCESS?

ja
Hello,

I am trying to combine/substring parts of three different fields into
one. For example, in sql, the syntax is as follows:

Once the extra field has been added to the table,

update xtable
set field1 = substring(field2, 1, 5) + substring(field3, 1, 5) +
substring(field4, 1, 10)

In paradox in objectpal:
tc1.field1=substr(tc1.field2,1,5)+substr(tc1.field 3,1,5)+substr(tc1.field4,1,10)

How can this be done in Access? I've been looking at the help online.
No luck so far.

ms access 2002

TIA
Nov 13 '05 #1
2 52287

Use the Mid() function: same parameters as substring().

Instead of the + symbol use the & symbol to concatenate the strings.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

ja wrote:
Hello,

I am trying to combine/substring parts of three different fields into
one. For example, in sql, the syntax is as follows:

Once the extra field has been added to the table,

update xtable
set field1 = substring(field2, 1, 5) + substring(field3, 1, 5) +
substring(field4, 1, 10)

In paradox in objectpal:
tc1.field1=substr(tc1.field2,1,5)+substr(tc1.field 3,1,5)+substr(tc1.field4,1,10)

How can this be done in Access? I've been looking at the help online.
No luck so far.

ms access 2002

Nov 13 '05 #2
ja
thank you.
On Thu, 05 May 2005 18:44:34 GMT, MGFoster <me@privacy.com> wrote:

Use the Mid() function: same parameters as substring().

Instead of the + symbol use the & symbol to concatenate the strings.


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Cady Steldyn | last post: by
2 posts views Thread by Michele Fondry via .NET 247 | last post: by
8 posts views Thread by chudson007 | last post: by
2 posts views Thread by P Adhia | last post: by
1 post views Thread by charvi | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.