Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Splitting a String

Author  Topic 

teq-killah
Starting Member

1 Post

Posted - 2010-09-29 : 04:11:15
Hi guys! Im a new member here. Can you guys help me creating a query for this?
Text:
09/29/2010 02:54:00 USERNAME1 (USR1) The Quick Brown Fox 09/29/2010 02:56:00 USERNAME2 (USR2) Jump over the lazy dog 09/29/2010 02:55:00 USERNAME3 (USR3) Hello World!

I would like the result to be like these:
Field1 Field2 Field3 Field4
| 09/29/2010 02:54:00 | USERNAME1 | (USR1) | The Quick Brown Fox |
| 09/29/2010 02:56:00 | USERNAME2 | (USR2) | Jump over the lazy dog |
| 09/29/2010 02:55:00 | USERNAME3 | (USR3) | Hello World! |

Thank you very much in advance.

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2010-09-29 : 07:44:11
search the forum for "split UDF" or "Split function".

http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-09-30 : 13:10:19
see

http://visakhm.blogspot.com/2010/02/parsing-delimited-string.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -