473,320 Members | 1,939 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Split information in fields

In my accesstable i have one field with two numbers separated by a slash
(i.e. 753/999).
I want to store the number before the slash (could be between 1 and 10
digits) in a field called "F1" and the number after the slash (could be
between 1 and 10 digits) in another field called "F2".
I have tried with right, left and len functions but I cannot make it work
the way I want.
If somebody could help me with some code to make this work I would be most
greatfull.
Best regards
Orjan
Nov 13 '05 #1
2 1743
On Fri, 04 Jun 2004 10:28:16 GMT, Orjan wrote:
In my accesstable i have one field with two numbers separated by a slash
(i.e. 753/999).
I want to store the number before the slash (could be between 1 and 10
digits) in a field called "F1" and the number after the slash (could be
between 1 and 10 digits) in another field called "F2".
I have tried with right, left and len functions but I cannot make it work
the way I want.
If somebody could help me with some code to make this work I would be most
greatfull.
Best regards
Orjan


Create an Update Query.
Update YourTable Set YourTable.F1 =
Left([FieldName],InStr([FieldName],"/")-1),
YourTable.F2 = Mid([FieldName],InStr([FieldName],"/")+1)
Where YourTable.[FieldName] is not null;

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2
F1 = Left([CombinedField],InStr([CombinedField],"/") - 1)
F2 = Mid([CombinedField],InStr([CombinedField],"/") + 1)

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Orjan" <or************@sparay.se> wrote in message
news:49********************@newsc.telia.net...
In my accesstable i have one field with two numbers separated by a slash
(i.e. 753/999).
I want to store the number before the slash (could be between 1 and 10
digits) in a field called "F1" and the number after the slash (could be
between 1 and 10 digits) in another field called "F2".
I have tried with right, left and len functions but I cannot make it work
the way I want.
If somebody could help me with some code to make this work I would be most
greatfull.
Best regards
Orjan

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: SL_McManus | last post by:
Hi All; I am fairly new to Perl. I have a file with close to 3000 lines that I would like to split out in a certain way. I would like to put the record type starting in column 1 for 2 spaces,...
8
by: uc_sk | last post by:
Hello All I am a newbie to PERL language...If i have a file with data of form abcd 4 {1,2,3} 3 lmn- 3 {12,18,19,22} 4 then i can read them as... ($list $listTotal $set $noElements) = split /...
5
by: NewToThis | last post by:
I am trying to use the split function to bread up lines in a file I am reading from. Some lines are working just fine, but a couple of the lines don't split up the way I would have thought. ...
5
by: Willem | last post by:
Hello I am quite hopeless and of course a newbe. The situation: Sql2k / query I would like it ot break down the following string: 2004 Inventory:Ex.Plant Farm1:1st Cut:Premium:0094
19
by: David Logan | last post by:
We need an additional function in the String class. We need the ability to suppress empty fields, so that we can more effectively parse. Right now, multiple whitespace characters create multiple...
3
by: Mark | last post by:
Hi I have an XML file with 50 fields, I want to split up these fields and put them in the corresponding fields in the SQL table whats the most efficent way to do this? and how do i do it ...
3
by: Ben | last post by:
Hi I am creating a dynamic function to return a two dimensional array from a delimeted string. The delimited string is like: field1...field2...field3... field1...field2...field3......
9
by: MrHelpMe | last post by:
Hello again experts, I have successfully pulled data from an LDAP server and now what I want to do is drop the data into a database table. The following is my code that will insert the data but...
1
by: Roy | last post by:
I have a table with two fields. I wish to separate all the data in one field and keep it listed against the information in the other field. The information within the field TicketStatus, I wish to...
4
by: Gangreen | last post by:
Hi, I'm new to Perl but I have some experience in other languages. Anyway I need to split a string on the character "|". let's say our string is "one|two|three" when I try the following code:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.