A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

splitting fields of ids and title.



 
 
Thread Tools Display Modes
  #1  
Old July 9th, 2008, 08:48 AM posted to microsoft.public.access.queries
Database User
external usenet poster
 
Posts: 39
Default splitting fields of ids and title.

Hello,

I'm wondering if anyone can help - i have an id field that i would like to
split into a few fields wherever there is a dash i want it to be a new field.
if there are 3 parts to the id. there can be 2 parts or 3 parts to the id e.g.

P2503-565 or 123-4567 or p765-456-765 and i want to split into a separate
field anything that is after the dash.

in addition if there is a letter at the beginning or a few letters i want to
split the letter separately.

thanks a lot

please help.
database user

  #2  
Old July 9th, 2008, 01:17 PM posted to microsoft.public.access.queries
Bob Barrows [MVP]
external usenet poster
 
Posts: 441
Default splitting fields of ids and title.

Database User wrote:
Hello,

I'm wondering if anyone can help - i have an id field that i would
like to split into a few fields wherever there is a dash i want it to
be a new field. if there are 3 parts to the id. there can be 2 parts
or 3 parts to the id e.g.

P2503-565 or 123-4567 or p765-456-765 and i want to split into a
separate field anything that is after the dash.

in addition if there is a letter at the beginning or a few letters i
want to split the letter separately.

I am having trouble following your description. I need a picture. Please
provide a few rows of sample data. Start with the above - assuming the name
of the source field is ID, then this is what you should start with:

ID
--------------------
P2503-565
123-4567
p765-456-765

Add at least a row that illustrates the scenario in your last sentence

Follow that by the rows of desired results you wish to get from that data.
The key word is "show" - do not attempt to repeat your description - show us
what the data should look like after the query runs. Also, tell us what
names you want for the new fields - you can show them as column headings
when you show us the desired results.


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.