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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|