I need some help/idea on designing a table.
Background/Requirements:
We import a flat file on a daily basis (with about 700,000 Records) that looks something like:
PortNo|CycleNo|SeqNum|FirstError|SecondError|ThirdError|FourthError|FifthError|TransactionDetails
Layout of the File/Table Currently:
PortNo - SmallInt
CycleNo to FifthError are all varchar(10)
TransactionDetails is varchar(210) (The data itself is Fix Width delimited - about 22 columns if broken out).
Problem:
The Application Support team wants the TransactionDetails column broken out into separate columns so that they can run queries against the Data w/o having to use the substring function.
I was wondering if someone can provide any suggestion if it would be better to break the TransactionDetails column up (during import) and create a custom import program that will insert the value into another table so that it would look something this:
ErrorInfoTbl TransactionDetailTbl
RecordID (PK) RecordID(FK)
PortNo Field1
CycleNo Field2
SeqNum Field3
FirstError ....and so
SecondError
ThirdError
FourthError
FifthError
I was thing about creating a view that will breaking the TransactionDetail columns using substring so that they can run queries W/O having to use substrings… however wouldn’t that solution have a major affect on query time? I'm looking a solution that will not have a major affect on query time, and also a way not to increase the time it take the data to import by to much....Any idea/suggestion…?
Thanks
Background/Requirements:
We import a flat file on a daily basis (with about 700,000 Records) that looks something like:
PortNo|CycleNo|SeqNum|FirstError|SecondError|ThirdError|FourthError|FifthError|TransactionDetails
Layout of the File/Table Currently:
PortNo - SmallInt
CycleNo to FifthError are all varchar(10)
TransactionDetails is varchar(210) (The data itself is Fix Width delimited - about 22 columns if broken out).
Problem:
The Application Support team wants the TransactionDetails column broken out into separate columns so that they can run queries against the Data w/o having to use the substring function.
I was wondering if someone can provide any suggestion if it would be better to break the TransactionDetails column up (during import) and create a custom import program that will insert the value into another table so that it would look something this:
ErrorInfoTbl TransactionDetailTbl
RecordID (PK) RecordID(FK)
PortNo Field1
CycleNo Field2
SeqNum Field3
FirstError ....and so
SecondError
ThirdError
FourthError
FifthError
I was thing about creating a view that will breaking the TransactionDetail columns using substring so that they can run queries W/O having to use substrings… however wouldn’t that solution have a major affect on query time? I'm looking a solution that will not have a major affect on query time, and also a way not to increase the time it take the data to import by to much....Any idea/suggestion…?
Thanks