Unable to retrieve data from tble

A

Arihan Sinha

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
UserName=\'arihan123\';')
puts res

end

update_emailid()

The error comes as

Test-unit version : 2.0.1 loaded
C:/Ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.6.3/lib/postgres-pr/connection.rb:142:in
`query': ERROR C42601 Mimproper qualified name (too many dotted names):
usermaster.schemas.public.tables.masteruser P19 Fgram.y L9933
Rbase_yyparse (RuntimeError)

Cheers
Arihan

Attachments:
http://www.ruby-forum.com/attachment/5085/screenshot.png
 
B

Brian Candler

Arihan said:
res = conn.exec('SELECT Email FROM
UserMaster.Schemas.public.Tables.MasterUser WHERE
UserName=\'arihan123\';') ...
`query': ERROR C42601 Mimproper qualified name (too many dotted names):
usermaster.schemas.public.tables.masteruser P19 Fgram.y L9933
Rbase_yyparse (RuntimeError)

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
Ruby.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top