Uploading CSV into PosgreSQL

  • CREATE TABLE movie_data (

    id SERIAL

    Movie_Title VARCHAR (100),

    Release_date VARCHAR (100),

    Wikipedia_URL VARCHAR (100),

    Genre VARCHAR (50),

    Director_1 VARCHAR (50),

    Director_2 VARCHAR (50),

    Cast_1 VARCHAR (100),

    Cast_2 VARCHAR (100),

    Cast_3 VARCHAR (100),

    Cast_4 VARCHAR (100),

    Cat_5 VARCHAR (100),

    Budget MONEY (50),

    Revenue MONEY (50),

    Primary Key (id)

    )

    • This topic was modified 2 years ago by  Mas.
    Attachments:
    You must be logged in to view attached files.
  • Using the Movie_Data spreadsheet sorry

  • This is a mostly SQL Server WebSite.  You might not get an answer for PostgreSQL here.  You might.

    The following search seems to have some example of what you're trying to do in PostgreSQL.

    https://duckduckgo.com/?q=import+csv+into+postgresql+table

    Here's a link to the top level of the PostgreSQL documentation.

    https://www.postgresql.org/docs/

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply