Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I parse text between two "tabs" in a memo field

Status
Not open for further replies.

DarthGAD

IS-IT--Management
Mar 17, 2004
37
US
QUESTION:
How do I parese a list of names stored in a memo field so I can put them on separate rows of data.

BACKGROUND:
I have a memo field that includes, among other things a list of names separated by comas. The names are between two tags <SME> and </SME>. Here is an example:

The list of names in between the tags is always the first line in the memo field. There can be any number of names in between the tags. Some names are FirstName LastName and others are FirstName MiddleName LastName, etc.

EXAMPLE:
<SME>John Smith, Jane Doe, John Doe, Jane Smith</SME>
Blah blah blah blah other non important text here blah blah.

DESIRED OUTPUT:
John Smith
Jane Doe
John doe
Jane Smith

I need to be able to treat each name as a separate record.

GOAL:
I have a DB with many documents. Each document is assigned one or more Subject Matter Expert (SME). When multiple SMEs are assigned to one document the value is stored in between the SME tags in a memo field. Not much I can do about that. It is what it is.

I need to produce a report for each SME showing them which documents they are responsible for.

I am open to a SQL Query or Crystal Formula solution.
 
I meant to say between two "Tags" NOT tabs. Sorry about that.
 
Please tell us how many total distinct names there may be.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top