?
Solved

CONCAT and SubStr in access

Posted on 2004-08-25
4
Medium Priority
?
9,864 Views
Last Modified: 2011-08-18
Hi..I urgently need the solution on the following case....please help

1. I would like to make a select statement using substr..but the access cannot process my query...it said the "substr" is not a valid command...

2. I have a field in the table to store the tel of client, some of the reocrd contact a "space" in-between the tel number...what is the fastest way to find out those record and correct them to "without space" in access??
0
Comment
Question by:esther_6694
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 12

Accepted Solution

by:
fulscher earned 252 total points
ID: 11891080
esther 6694, concerning the 1st question: please post the query as you have it now.

Concerning the second question: first create a normal query:
SELECT (replace(tel, " ", "")) from tablename;
and check whether this gives the results which you need. If so, you can create an update query to fix the fields (make a backup first!!!):

UPDATE table SET tel = Replace([tel]," ","");

Hope this helps
Jan


0
 
LVL 9

Assisted Solution

by:solution46
solution46 earned 248 total points
ID: 11891081
The commands you need are Mid() for SubString and Replace() to get rid of the spaces.

The Access online help should tell you all you need to know about these functions.

s46.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question