473,574 Members | 5,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(field 2, 1, 5) + substring(field 3, 1, 5) +
substring(field 4, 1, 10)

In paradox in objectpal:
tc1.field1=subs tr(tc1.field2,1 ,5)+substr(tc1. field3,1,5)+sub str(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 52620

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

Instead of the + symbol use the & symbol to concatenate the strings.
--
MGFoster:::mgf0 0 <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(field 2, 1, 5) + substring(field 3, 1, 5) +
substring(field 4, 1, 10)

In paradox in objectpal:
tc1.field1=subs tr(tc1.field2,1 ,5)+substr(tc1. field3,1,5)+sub str(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
1948
by: Cady Steldyn | last post by:
Example: Date | ItemCode | Stock_In_qty | Stock_Out_qty | Bal_qty ------------------------------------------------------------------ 12/09/2003 | A100 | 20 | 0 | 20 25/10/2003 | A100 | 0 | 10 | *10 I need to query an Access database that will take field 3 (Stock_In_qty)...
2
6733
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: Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. ...
8
5747
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 each cell I am trying to capture the number between 'TranID=' and the next '&'. So in the fisrt cell I would like to capture 14078800. Things you will need to keep in mind are; The number is not...
2
3505
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 , a.LAST_UPD , a.LAST_UPD_BY
7
7340
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 when I make the same calculation in visual basic, the value returned is 0. Can anyone tell me why the expression (4 and 1) return different value
4
2908
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 partial name. I have tried a few different things, but either get no results or all of the records in BANKS are returned. I am using Access 2000 on XP. I am using three tables for this query:...
1
1901
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 Smith i want to extract John how to extract this can any one suggest me query thanks in regards
5
9119
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 $db_server,$db_user,$db_pass,$db;//Global Values from the config.php $conn = @mysql_connect($db_server,$db_user,$db_pass) or die("Connection to Database Server Failed"); @mysql_select_db($db) or die("Database Selection...
2
1728
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 http:/publishing/45/100006_f.SAL_Local.html 2 http:/publishing/45/100006_f.SAL_Area.html I need a substring query that will return the values of Local and Area from column URL of Table URL_3 into an additional column...
0
7826
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8085
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7838
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8126
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5637
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3781
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2257
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1362
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1090
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.