SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


String Tokenizing and Tokens processing


String Tokenizing and Tokens processing

Author
Message
pshvets
pshvets
SSC-Enthusiastic
SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)

Group: General Forum Members
Points: 166 Visits: 154
Hello all,
I have a table with time snapshots about servers uptime since last reboot:
deviceid value
100 3456:12345:23:98904:
200 458458:567890346:232323:128586:

As you see timesnapshots are locked up in a string.
I need to determine if there was a downtime event - next timesnapshot < then previous
Like in case with deviceid=100 - 23 < 12345 it means server was down. I need to capture this event.
I am able to tokenize a string into a table of records:

TokenID Token
1 3456
2 12345
3 23
4 98904

Oracle PL/SQL has arrays, I can do it relatively easy there. T-SQL has no arrays...
Could you suggest how to process them?
I can process string in Perl, but I'd like, if possible, do all processing in the database.

Regards,
Pit.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search