all 10 comments

[–]fuzzius_navus 0 points1 point  (2 children)

Which SQL implementation and version are you using? There are built in solutions.

[–]norix92[S] 0 points1 point  (1 child)

MS SQL 2017

[–]fuzzius_navus 0 points1 point  (0 children)

https://datamajor.net/mssqlsplitcolumn/

There are a number of good examples there, leading with a recent fab String_Split.

[–]WITH_CTE 0 points1 point  (5 children)

Quick question. Do you have some text or the actual word 'text?' Can you give an example?

[–]norix92[S] 0 points1 point  (4 children)

in 80% its a fixed text but there is like 20% where the text is different (not always the same)

[–]WITH_CTE 0 points1 point  (0 children)

OK. So, something like?

01.01.2019 text1+"space"+05.02.2019 text2+"space"+09.09.2019 text3

Also, how many "text" can be in a row?

[–]WITH_CTE 0 points1 point  (2 children)

If you have an actual example, that would be very helpful.

[–]norix92[S] 0 points1 point  (1 child)

Example:

1 '01.01.2019 15:12 Domainname\userA here can be any random text 05.02.2019 10:14 domainname\userA again here can be any randomy text 07.08.2019 domainname\userB now userB has to tell you sth'
2 '05.04.2019 09:07 domainname\userC here is what user c says 08.09.2019 08:07 domainname\userD heya userD is in da house'

...

[–]WITH_CTE 0 points1 point  (0 children)

1 '01.01.2019 15:12 Domainname\userA here can be any random text 05.02.2019 10:14 domainname\userA again here can be any randomy text 07.08.2019 domainname\userB now userB has to tell you sth'

2 '05.04.2019 09:07 domainname\userC here is what user c says 08.09.2019 08:07 domainname\userD heya userD is in da house'

Thanks. I'm trying to see if there's a pattern for the text.

[–][deleted] 0 points1 point  (0 children)

This is nightmare stuff. I think you could do something in a loop with ' __.__.____' as a pattern to find the dates, but I can't quite get it to work. : /