2012年3月26日星期一

flat file to raletionship database

I have an app which needs to download from mainframe flat file to my
relationship database (Parent - Child) tables.
I would like to know are there any better solution.
My flat file data structure like following:
Filed Name
Account Number : Char(10)
Account Name: Char(35)
Address1 Char(30)
Address2 Char(30)
City Char(25)
....etc
New table:
Parent table:
Account Number: Char(10)
Account Name Char(35)
Child table:
Account Number char(10)
Update ID Integer
Address1 char(30)
Address2 char(30)
City char(25)
The app downloads data every night and convert to my parent child table.
I can use append query to copy all the data to my table.
The problem is in child table. I need add a Update ID and validate
duplicates.
I have to append the data and make sure the record does not duplicates.
Are there any better solutions for this application?
Any information is great appreciated.
Thanks in advance,
Souris,Since you're the only who knows what the business rule for data
transformation, we would not be able to suggest much. The only advice I can
give is to upload the data into a work table and then call a stored
procedure that has your business rule implemented to massage the data.
-oj
"souris" <soukkris@.viddotron.com> wrote in message
news:u79vhWaCFHA.4008@.tk2msftngp13.phx.gbl...
>I have an app which needs to download from mainframe flat file to my
>relationship database (Parent - Child) tables.
> I would like to know are there any better solution.
> My flat file data structure like following:
> Filed Name
> Account Number : Char(10)
> Account Name: Char(35)
> Address1 Char(30)
> Address2 Char(30)
> City Char(25)
> ....etc
> New table:
> Parent table:
> Account Number: Char(10)
> Account Name Char(35)
> Child table:
> Account Number char(10)
> Update ID Integer
> Address1 char(30)
> Address2 char(30)
> City char(25)
>
> The app downloads data every night and convert to my parent child table.
> I can use append query to copy all the data to my table.
> The problem is in child table. I need add a Update ID and validate
> duplicates.
> I have to append the data and make sure the record does not duplicates.
> Are there any better solutions for this application?
> Any information is great appreciated.
> Thanks in advance,
> Souris,
>

没有评论:

发表评论