472,353 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 52483

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Cady Steldyn | last post by:
Example: Date | ItemCode | Stock_In_qty | Stock_Out_qty | Bal_qty ------------------------------------------------------------------ ...
2
by: Michele Fondry via .NET 247 | last post by:
hello. I have a webform form app in vb.Net that uses a SQL query. I am trying to use the substring function, but get the following error:...
8
by: chudson007 | last post by:
I need help capturing information from a free text field. The 10 examples below contain examples of the information I am trying to capture. In...
2
by: P Adhia | last post by:
Hi, I am trying to understand why following simple query is running very slow (33 hours) select ROW_ID , a.CREATED , a.CREATED_BY ,...
7
by: rguarnieri | last post by:
Hi! I'm trying to create a query with a boolean expression like this: select (4 and 1) as Value from Table1 this query return always -1, but...
4
by: GladGad | last post by:
I am not a real well versed query writer and therefore am having some problems figuring out how to write a parameter query where I want to input a...
1
by: charvi | last post by:
Hi i have problem in query to extract a sub string from a string that is i want to extract first name from name for eg if i have a name John...
5
by: lisles | last post by:
i have a page funtion.php which hs the function to connect to the db /* Mysql Connection */ function connect(){ global...
2
by: Ken Jones | last post by:
Table URL_3 consist of the following 2 columns of information being Record No and URL No URL 1 ...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.