I would create the three tables with the first one containing the fields as
in the csv file. Then import the csv-file into that table, populate the
other two using SQL with constraints in tables 2 and 3 not to contain
duplicates.

When sucessful, alter the definition of table one dropping the columns that
are now in the other two tables.

Regards
Johann


On 4 July 2013 12:00, Rohitraj Sharma <[email protected]>wrote:

> I need a little help of you.
>
> I have three table county which contains ID and country name
> 2nd table is State table which contain state id, state name country id
> 3rd table is city table city id, city name, state id and county id.
>
> i have one master csv file of city table which contains name of country or
> state Example
>
> city namestate name counry nameBangaloreKarnatakaIndiaKotaRajistanIndiaabc
> karntakaIndiacdeabcUk
>
>
>
>
> What  i want to split the master file into 3 parts(country, state and
> city) with auto generate ids
>
> example
>
> idcontry name                            idstatecontry ididcity namestate
> idcountry id1India1Karnataka11Bangalore112Uk2Rajaistan22Kota213abc33abc114
> cde32
> can any one guide me .
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to