Table To CSV

Discussion in 'Questions (Windows Mobile)' started by ceaser, Nov 18, 2008.

  1. ceaser

    ceaser Active Member Licensed User

    Hi All

    I have a SQLite file called say "Job1". In "Job1" I have many tables....i.e horizontal alignment, vertical alignment, crossfalls, surface widths, Kerb Line, etc.

    I would like to export all of these tables to one "csv" file. At the moment the tables override the data that is in the "csv" already.:sign0148:

    Please hilfe:sign0085:

    Thanks
    Michael
     
  2. Cableguy

    Cableguy Expert Licensed User

    Use a hidden table and append ALL the values to it, by going one table at a time, and copying each row..
    Or you can easelly use the command from sql to append the data to this table...
    Then export this hidden table to csv...
     
  3. ceaser

    ceaser Active Member Licensed User

    Hi Cableguy

    Thanks for your reply. I did try what you have mentioned with the sql command before, but the problem is that each Table has a different number of columns....ie. Horizontal Alignment(YCoord, XCoord, Radius, TransitionIn, TransitionOut), Vertical Alignment(Stakevalue, VPILevel, Length1, Length2), Local Coord File(Point Name, YCoord, XCoord, ZCoord, Decription)....etc.

    Any other ideas?:sign0085:

    Thanks
    Michael
     
  4. Cableguy

    Cableguy Expert Licensed User

    YES, One other possibility is to export each table to csv, and the load them and merge into a single file...
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    Are these tables with exactly the same columns?
     
  6. ceaser

    ceaser Active Member Licensed User

    Hi Erel

    No. Each Table has different number of columns.

    regards
    Michael
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    So what will be structure of the merged CSV file?

    You should look for the sql UNION command to create a query that returns data from several tables.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice