I have searched many places and rarely use forums for posting... So I believe I have a rare issue here. I have a csv file that contains a one to many relationship. In the form of say the first 10 fields contain the one record. This continues to a blank field and then within each additional field is another delimiter being a pipe that has fields within it. This is actually a log file of events that occured relating to a single call.
For example.
ID;MACHINEID;ANI;;COMMAND|ARGUMENTS|20120112.06:15:32
The bolded text can repeat many times or a few. This is the many side of the join on SQL. I need to get this back into SQL. I am thinking SSIS Script Block. Where I loop and add to the many table with the ID from the one side. Splitting the internal fields with the pipe as delimiter. I just wonder if anyone has seen this before and has a simple solution that maybe I don't know about. I would imagine that this would have been better created in XML but alas that is not the case.
Any help is appreciated. I will even take criticism if it is mostly constructive. Thanks so much in advance.
To show table makeup
CREATE TABLE [dbo].[tblIVRCalls](
[CALLID] [char](50) NOT NULL,
[MACHINEID] [char](50) NOT NULL,
[CHANNEL] [char](50) NOT NULL,
[DNIS] [char](50) NOT NULL,
[ANI] [char](50) NOT NULL,
[STARTTIME] [smalldatetime] NOT NULL,
[TRUNK] [char](50) NOT NULL,
[APPLICATION] [char](50) NULL,
[PLANID] [char](50) NULL,
[DERIVEDID] [char](50) NULL,
[TOTALTIME] [smalldatetime] NOT NULL,
CONSTRAINT [PK_tblIVRCalls] PRIMARY KEY CLUSTERED
CREATE TABLE [dbo].[IVRCallActions](
[pk] [bigint] IDENTITY(1,1) NOT NULL,
[fkCALLID] [char](50) NOT NULL,
[SequenceNumber] [bigint] NOT NULL,
[Command] [char](50) NOT NULL,
[Arguments] [varchar](max) NOT NULL,
[ExecutionTime] [datetime] NOT NULL,
CONSTRAINT [PK_IVRCallActions] PRIMARY KEY CLUSTERED