473,394 Members | 1,726 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,394 software developers and data experts.

Split up information in a single field

Hi,

I am trying to split up data from one field of a record into 2 fields of a record. Here some sample data;

Orginal Field
Plain
Xtreme-Slash
Mark/Ventura2 XXS
Yellow
Red XXL

This is expression I used for the 1st new field.
ColorOP: Left([family_members]![friendly_name],InStr(1,[family_members]![friendly_name]," ")-1)

Results 1st New Field
#Error
#Error
Mark/Ventura2
#Error
Red

This is expression I used for the 2nd new field.
SizeOP: Mid([family_members]![friendly_name],InStr(1,[family_members]![friendly_name]," ")+1)

Results 2nd New Field
Plain
Xtreme-Slash
XXS
Yellow
XXL

The result I would like to see is:

1st Field 2nd Field
Plain
Xtreme-Slash
Mark/Ventura2 XXS
Yellow
Red XXL

I believe that error I get from "Plain, Xtreme-Slash, and Yellow" is because the is no space after them.
Dec 1 '06 #1
2 1272
MMcCarthy
14,534 Expert Mod 8TB
Try ...

Expand|Select|Wrap|Line Numbers
  1.  
  2. ColorOP: Left([family_members]![friendly_name],nz(InStr(1,[family_members]![friendly_name]," "), Len([family_members]![friendly_name]) + 1) -1)
  3.  
Dec 1 '06 #2
NeoPa
32,556 Expert Mod 16PB
Try ...

Expand|Select|Wrap|Line Numbers
  1. ColorOP: Left([family_members]![friendly_name],nz(InStr(1,[family_members]![friendly_name]," "), Len([family_members]![friendly_name]) + 1) -1)
  2.  
Another, similar trick would be :
Expand|Select|Wrap|Line Numbers
  1. ColorOP: Left([family_members].[friendly_name],InStr(1,[family_members].[friendly_name] & " "," ")-1)
Dec 1 '06 #3

Sign in to post your reply or Sign up for a free account.

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...
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
4
by: William Stacey [MVP] | last post by:
Would like help with a (I think) a common regex split example. Thanks for your example in advance. Cheers! Source Data Example: one "two three" four Optional, but would also like to...
3
by: Rico | last post by:
If there are consecutive occurrences of characters from the given delimiter, String.Split() and Regex.Split() produce an empty string as the token that's between such consecutive occurrences. It...
2
by: Matt | last post by:
I have a client that transmits a file to us with many XML documents enclosed. The problem is that each is a different format and may have different encodings as they contain information from many...
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.
3
by: Roy | last post by:
Hi All, I have a table in A2K application.I get a memo field via download from a .csv file.The contents are as below: field name is TicketStatus, For example,a single ticket,TicketID 12345 ...
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...
2
by: AdrianJ1980 | last post by:
Hi, I apologise for not providing a code basis for my question, but i really am stuck. Does anyone know how i can split a memo field, such as below, into separate records. (The data comes from...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
0
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...

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.