Unable to retrieve data from tble

Discussion in 'Ruby' started by Arihan Sinha, Sep 24, 2010.

  1. Arihan Sinha

    Arihan Sinha Guest

    Hi All,

    I am unable to retrieve data from table.The screenshot is also attached
    for determining the position of table in the database. Any thoughts how
    to sort it out? I am using Postgres

    #The table name is MasterUser

    require 'postgres'

    def update_emailid()

    conn = PGconn.connect("chi-test-dbs1", 5432, '', '', "UserMaster",
    "postgres", "postgres")
    res = conn.exec('SELECT Email FROM
    UserMaster.Schemas.public.Tables.MasterUser WHERE
    puts res



    The error comes as

    Test-unit version : 2.0.1 loaded
    `query': ERROR C42601 Mimproper qualified name (too many dotted names):
    usermaster.schemas.public.tables.masteruser P19 Fgram.y L9933
    Rbase_yyparse (RuntimeError)


    Arihan Sinha, Sep 24, 2010
    1. Advertisements

  2. This isn't a ruby question, it's a postgres one.

    Make a query which works using the pg command line tool, then use it in
    Brian Candler, Sep 24, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.