splitting fields of ids and title.

  • Thread starter Thread starter Database User
  • Start date Start date
D

Database User

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
 
Database said:
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.
 
Back
Top