Thank you for the Help. The thing is that I am not allowed to use SSIS. Just Sql and executables are allowed... I know thats really silly but what can I do? I could call the SSIS through the sql command but I would probably get fired the next day ;-);-);-). But you have give me a good Idea to improve the simple vb.code that I had wrote. I will everytime when I find the Header Identifier create a new Guid instead to increase my integer!!! Thanks, thats a first step to improve the whole thing!!:-):-):-)
Dim strFileName() As String
strFileName = IO.File.ReadAllLines(filename, Encoding.GetEncoding(1253))
Dim headerIdent as string = "H"
Dim g As Guid
For Each myLine In strFileName
If Not myLine = Chr(endCharacter) Then
If myLine.Substring(0, 2) = headerIdent Then
g = Guid.NewGuid()
End If
tempStr &= g & ";" & myLine.ToString & Environment.NewLine
End If
Next