By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,377 Members | 3,052 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,377 IT Pros & Developers. It's quick & easy.

how to run a substring query in ACCESS?

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a

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

P: n/a
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.