multiple flat files to relational DB

  • Follow


Hello!

 I have multiple flat files that I'm trying to get into a FMP 8 (not
advanced) relational database.  Each flat file has fields that
correspond to different tables.  For example, field A of the flat file
belongs to table B and field B belongs to table A.  I'm trying to
determine the best way to import these records.  From reading previous
posts I've read that one way would be to assign unique ids in the flat
file and use them to relate the tables.  Is this the best way to go
about doing this?  It seems so cumbersome!  I have about 6 different
flat files to import (FMP7 and excel).  Is there a way to script this?

Also, if this IS the best way to this, what is a good way to script the
adding of unique ids to the flat file?  I can't get it to insert a
GetNextSerialValue since I'm adding them after the records were
created.

Thanks for your time.

Sadie

0
Reply sadiewms (8) 2/15/2006 5:26:51 PM

Relating tables is best done using not changing, incremental, unique ID's

After your initial import, create an ID field < text ; auto enter serial 
number ; generate on creation ; next value IDa_000001 ) (Yes the text field 
does include an auto incrementing numnber)

Place the id field on a layout
Click CTRL-= (Control and the = keys)
You get a dialog Replace Field Contents
Select 'Replace with serial numbers'
initial value IDa_000001
increment by 1
select the box next to Update serial number in Entry Options (the tick is 
on)
Click replace
You don't get any warning, all previous values in this field are now being 
replaced. With a lot of records the process takes some time.
Remove the field from the layout (or protect it from being altered)

Ursus

"Sadie" <sadiewms@gmail.com> schreef in bericht 
news:1140024411.050641.252060@g43g2000cwa.googlegroups.com...
> Hello!
>
> I have multiple flat files that I'm trying to get into a FMP 8 (not
> advanced) relational database.  Each flat file has fields that
> correspond to different tables.  For example, field A of the flat file
> belongs to table B and field B belongs to table A.  I'm trying to
> determine the best way to import these records.  From reading previous
> posts I've read that one way would be to assign unique ids in the flat
> file and use them to relate the tables.  Is this the best way to go
> about doing this?  It seems so cumbersome!  I have about 6 different
> flat files to import (FMP7 and excel).  Is there a way to script this?
>
> Also, if this IS the best way to this, what is a good way to script the
> adding of unique ids to the flat file?  I can't get it to insert a
> GetNextSerialValue since I'm adding them after the records were
> created.
>
> Thanks for your time.
>
> Sadie
> 


0
Reply ursus 2/15/2006 8:50:40 PM


1 Replies
135 Views

(page loaded in 0.047 seconds)

Similiar Articles:













7/10/2012 3:37:38 PM


Reply: