Currently I am working with a provider built SQL Server DB. This DB has data coming in from calls made through their system. The main table where data stored has 7 fields. 1 field is the Primary Key then 2 foreign keys, a couple datatime stamps and finally a massive field call "SergmentLog"
Within this field the data comes over unstructured. Here is an example of what the data looks like:
/20160219T154710.554-07/0?S=50&E=3512&CUTC=20160219T155235.662-07&1=100187177120160219&2=0&3=18823&4=user%20queue:icadmin&5=&6=Interact&7=|/20160219T154729.377-07/0?S=50&E=3504&CUTC=20160219T155235.663-07&1=100187177120160219&2=0&3=81592&4=user%20queue:icadmin&5=&6=LocalTransfer&7=%3cDetails%20TransferringUser%3d%22ICadmin%20-%22%20TransferringInteractionId%3d%22100187177120160219%22%20TransferredInteractionId%3d%22100187177120160219%22%20/%3e%0a&8=&9=2|/20160219T154850.970-07/0?S=50&E=3502&CUTC=20160219T155235.663-07&1=100187177120160219&2=0&3=55&4=&5=workgroup%20queue:Central%20Ops%202&6=LocalTransfer&7=%3cDetails%20TransferringUser%3d%22ICadmin%20-%22%20TransferringInteractionId%3d%22100187177120160219%22%20TransferredInteractionId%3d%22100187177120160219%22%20TransferredUser%3d%22Phoenix%20AZ%22%20/%3e%0a|/20160219T154851.025-07/0?S=50&E=3500&CUTC=20160219T155235.664-07&1=100187177120160219&2=0&3=1048&4=&5=&6=Queue&7=%3cDetails%20IVRAppName%3d%22Central%20Ops%202%22%20/%3e%0a|/20160219T154852.073-07/0?S=50&E=3502&CUTC=20160219T155235.664-07&1=100187177120160219&2=0&3=13344&4=&5=workgroup%20queue:Central%20Ops%202&6=Interact&7=|/20160219T154905.417-07/0?S=50&E=3504&CUTC=20160219T155235.664-07&1=100187177120160219&2=0&3=26202&4=user%20queue:icadmin&5=workgroup%20queue:Central%20Ops%202&6=LocalDisconnect&7=&8=&9=5
What I am told is that each "SegmentLog" could have multiple "Events", called "E=" within the SegmentLog field. Each event is broken out by the "|" pipe symbol. But prior to each even, there is a datatime stamp from the server, then a SourceID (called "S=") then finally the EventID (Called "E=")
After each EventID (number from 3500 - 3512) There will be Attributes numbering from 1-9 (Called "1=", "2=" etc.).
Keeping in mind that there may be multiple events per SegmentLog with the same EventID, and not all attributes will show in every EventID (IE E=3502 may only shows attributes 1-6, while E=3503 may show attributes 1-9) what would be the best way to structure this data into a table structure. The tools I have available are building complex search queries inside of a view or intermediate SSIS knowledge.
EDIT
I would like to see the data come out to something like this. But including all attributes:
DateTime Sequence EventID Attr1 Attr3
-------- -------- ------- ----- -----
/20160219T154710.554-07/0? s=50 &E=3512 &1=100187177120160219 &3=18823
/20160219T154729.377-07/0? S=50 &E=3504 &1=100187177120160219 &3=81592
/20160219T154850.970-07/0? S=50 &E=3502 &1=100187177120160219 &3=55
/20160219T154851.025-07/0? S=50 &E=3500 &1=100187177120160219 &3=1048