Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Issues with table join

Issues with table join

Issues with table join

I am trying to extract two columns from table a and would like to join to table b to pull data where the abbrname (abbreviated name)is equal and the status field in table b is equal to A.

However, when I try this Postgres acts like it does not know how to reference the table data in the schema ( in the Postgres database). If I select everything with no criteria, the query runs fine. Below is the working query.

select *
from "Naturalisthrs".naturalist_members
full outer join "Naturalisthrs".naturalisttimesheet
on nmember = abbrname

Here is the query looking for the first two columns of table A, and the error received.

select Fname, Lname
from "Naturalisthrs".naturalist_members
full outer join "Naturalisthrs".naturalisttimesheet
on nmember = abbrname

ERROR: column "fname" does not exist
LINE 1: select Fname, Lname
HINT: Perhaps you meant to reference the column "naturalist_members.Fname" or the column "naturalist_members.Lname".
SQL state: 42703
Character: 8

Postgres is throwing me a curve as a new user to this database. Any guidance for a novice would be appreciated.

PgAdmin 3.6
Postgres 9.6
Mac OsX 10.11.6

RE: Issues with table join


Quote (wbower34)

Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to lower case. For example, the identifiers FOO, foo, and "foo" are considered the same by PostgreSQL, but "Foo" and "FOO" are different from these three and each other.
( PostgreSQL Documentation | The SQL Language | SQL Syntax | Lexical Structure | Identifiers and Key Words )

CODE --> PostgreSQL

select "Fname", "Lname"
from "Naturalisthrs".naturalist_members
full outer join "Naturalisthrs".naturalisttimesheet
on nmember = abbrname 


RE: Issues with table join

Thank you, Feherke that solved what i was missing.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close