Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

String Tokenizing and Tokens processing Expand / Collapse
Author
Message
Posted Tuesday, March 17, 2009 10:22 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, February 18, 2011 10:54 AM
Points: 54, 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.
Post #677671
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse