parse a TEXT string

  • I am trying to split a field in our database and the field looks like the string below, but I can't find a reliable way to extra each set of data. Any help would be appreciated. Here's an example:

    Mar 10 2010 13:30:27(StephanieJ) Status is changed from "Work" -> "SCR" Mar 10 2010 13:22:37(AdamH) Status is changed from "Test" -> "Work" Mar 10 2010 13:22:37(AdamH) No Change Mar 02 2010 09:33:59(MichelleK) Team Support is changed from "" -> "AdamR" Mar 02 2010 09:33:59(MichelleK) Status is changed from "Need Team Support" -> "Team Assigned" Mar 02 2010 08:37:43(StephO) Status is changed from "Work" -> "Need Support" Mar 02 2010 08:29:54(StephanieJ) Problem Description is changed Mar 01 2010 15:55:32(ChrisN) Status is changed from "Unassigned" -> "Work" Mar 01 2010 15:55:32(ChrisN) Support is changed from "" -> "StephO" Mar 01 2010 15:53:27(WebTickets) created

    I can see that it is always datetime stamp followed by (userid) then some spaces and the action, but the pattern changes with the different actions and diferent users so I don't see a common pattern upon which I can delimit the string.

    Thanks in advance.

    --Adam

  • it looks like the data consistently has a dbl quote ending the last comment, followed by a three char monthly abbreviation that starts the next comment.;

    if you did a repetitive replace to replace " Jan|" Feb|" Mar with a known delimiter, i think you could then split it the want you want. you only gave one record as an example, but that's how i would tackle it.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • This was removed by the editor as SPAM

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply