Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7746275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:14:16+00:00 2026-06-01T10:14:16+00:00

Im trying from postgres console this command: select sim.id as idsim, num.id as idnum

  • 0

Im trying from postgres console this command:

select sim.id as idsim, 
       num.id as idnum 
from main_sim sim 
  left join main_number num on (FK_Numbers_id=num.id);

and I’ve got this response:

ERROR:  column "fk_numbers_id" does not exist
LINE 1: ...m from main_sim sim left join main_number num on (FK_Numbers...

but if I simply check my table with:

dbMobile=# \d main_sim

 id              | integer               | not null default

 Iccid           | character varying(19) | not null

...

 FK_Device_id    | integer               | 

 FK_Numbers_id   | integer               | 

Indexes:
    "main_sim_pkey" PRIMARY KEY, btree (id)
    "main_sim_FK_Numbers_id_key" UNIQUE, btree ("FK_Numbers_id")
    "main_sim_Iccid_key" UNIQUE, btree ("Iccid")
    "main_sim_FK_Device_id" btree ("FK_Device_id")
Foreign-key constraints:
    "FK_Device_id_refs_id_480a73d1" FOREIGN KEY ("FK_Device_id") REFERENCES main_device(id) DEFERRABLE INITIALLY DEFERRED
    "FK_Numbers_id_refs_id_380cb036" FOREIGN KEY ("FK_Numbers_id") REFERENCES main_number(id) DEFERRABLE INITIALLY DEFERRED

…as we can see the column exist.

probably it’s syntax error, but I’m unable to see what…

any help will’be appreciated.
Alessio

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:14:17+00:00Added an answer on June 1, 2026 at 10:14 am

    No, the column FK_Numbers_id does not exist, only a column "FK_Numbers_id" exists

    Apparently you created the table using double quotes and therefor all column names are now case-sensitive and you have to use double quotes all the time:

    select sim.id as idsim, 
           num.id as idnum 
    from main_sim sim 
       left join main_number num on ("FK_Numbers_id" = num.id);
    

    To recap what is already documented in the manual:

    The column foo and FOO are identical, the columns "foo" and "FOO" are not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Postgres and I'm trying to write a query like this: select count(*)
I am trying to convert this code from Oracle: CREATE VIEW PLANNED AS SELECT
I am trying to loop from 100 to 0. How do I do this
I am trying to see from an SQL console what is inside an Oracle
I am trying to import a txt/csv file into my postgres database from php
I'm trying to do something like this in Progress SQL (THIS IS NOT POSTGRES!)
I am trying to convert from a sqlite3 db to Postgres (so that I
I'm trying to wrap my head about how postgres spatial stuff works from a
I am trying to use this query in Postgres 9.1.3: WITH stops AS (
I'm trying to create a FUNCTION in my Postgres database from a Bash script.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.