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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parse text

Status
Not open for further replies.

simma

Programmer
Sep 11, 2001
398
US
Hello,
we have a field in table which needs to be parsed.
These are basically comments which need to be parsed to separate table

ln comments
2003 12/03/04 user called
01/04/04 fax was recieved
01/05/04 we responded

2004 01/01/04 case was registered
03/04/04 bk filed

the data needs to be parsed like this

ln date comments
2003 12/03/04 user called
2003 01/01/04 fax was recieved
2003 01/05/04 we responded
2004 01/01/04 case was registered
2004 03/04/04 bk filed

Please advice
Thanks
 
after amending the table to include a field called comm_date do:
Code:
Update yourtable
set comm_date = left(comments,8)

Update yourtable
set comments = substring(comments,patindex('% %',comments)+1,4000)

[bandito] [blue]DBomrrsm[/blue] [bandito]

[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]
 
Thanks dbomrrsm , I will give it a shot...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top