473,399 Members | 2,774 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,399 software developers and data experts.

How to split one field to many

I have a field called "notes".
I want to seperate this field to two and more.
the carachater "#" indicates the begining of a new field.
For example:
if "notes" is:
"My name is John # the name of my friend is jim # jim leaves in NY#"

In the new table (or query) I want to see:
Under the field "Notes": "My name is John"
Under the (new) field "Notes1": "the name of my friend is Jim"
Under the (new) field "Notes2": "jim leaves in NY"

Is it possible to seperate the field "notes" to three fields? How?

Thanks,

galsaba

Nov 13 '05 #1
3 1656

"galsaba" <ga*****@aol.com> ha scritto nel messaggio
news:11**********************@o13g2000cwo.googlegr oups.com...
I have a field called "notes".
I want to seperate this field to two and more.
the carachater "#" indicates the begining of a new field.
For example:
if "notes" is:
"My name is John # the name of my friend is jim # jim leaves in NY#"

In the new table (or query) I want to see:
Under the field "Notes": "My name is John"
Under the (new) field "Notes1": "the name of my friend is Jim"
Under the (new) field "Notes2": "jim leaves in NY"

Is it possible to seperate the field "notes" to three fields? How?

Thanks,

galsaba


Hi,
use the function for string manipulation -> Mid(), Instr(), Left(), Len()
etc...
Nov 13 '05 #2

"galsaba" <ga*****@aol.com> ha scritto nel messaggio
news:11**********************@o13g2000cwo.googlegr oups.com...
I have a field called "notes".
I want to seperate this field to two and more.
the carachater "#" indicates the begining of a new field.
For example:
if "notes" is:
"My name is John # the name of my friend is jim # jim leaves in NY#"

In the new table (or query) I want to see:
Under the field "Notes": "My name is John"
Under the (new) field "Notes1": "the name of my friend is Jim"
Under the (new) field "Notes2": "jim leaves in NY"

Is it possible to seperate the field "notes" to three fields? How?

Thanks,

galsaba


Example:

I have 2 field: CAP and another...

In a vba module declare the function...

Public Function DividiIndirizzo(IndirizzoUnico As String, PrimaDopo As
Integer) As String
Dim Conta As Integer
Dim Conta2 As Integer
Dim Pippo As String
DividiIndirizzo = ""
For Conta = 1 To Len(IndirizzoUnico) - 5
Pippo = ""
For Conta2 = 0 To 4
If IsNumeric(Mid(IndirizzoUnico, Conta + Conta2, 1)) Then
Pippo = Pippo & Mid(IndirizzoUnico, Conta + Conta2, 1)
End If
Next Conta2
If Len(Pippo) = 5 Then
If PrimaDopo = 1 Then
DividiIndirizzo = Left(IndirizzoUnico, Conta - 1)
Exit Function
Else
DividiIndirizzo = Mid(IndirizzoUnico, Conta)
Exit Function
End If
End If
Next Conta
End Function
-----------------
create a query with sql...

SELECT Tabella1.TuttoInsieme, DividiIndirizzo([TuttoInsieme],1) AS Campo1,
DividiIndirizzo([TuttoInsieme],2) AS Campo2
FROM Tabella1;-----------------Ok?
Nov 13 '05 #3
Ali
use split() function.

Nov 13 '05 #4

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

Similar topics

5
by: Arjen | last post by:
Hi All, What I want to is using a string as PATTERN in a split function. This makes it possible for me to change the PATTERN on one place in my script... For example: $separator = ";"; $line...
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 ...
11
by: pmarisole | last post by:
I am using the following code to split/join values in a multi-select field. It is combining all the values in All the records into one long string in each record in recordset. Example: I have a...
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...
9
by: martinskou | last post by:
Hi, I'm looking for something like: multi_split( 'a:=b+c' , ) returning: whats the python way to achieve this, preferably without regexp? Thanks.
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: kaplan.gillian | last post by:
Hi everyone, I currently have an Access database that includes quite a few long memo fields. When I create a report of my data, Access does not allow the memo fields to be split with the page...
5
by: HY26 | last post by:
Hello - First off, I'm fairly new with using Access. I have a text field that contains a full address and I would like to split that field into 4 parts - street address, town, state, & zip. I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.