Re: New user questions

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: psycopg(at)postgresql(dot)org
Subject: Re: New user questions
Date: 2021-07-14 21:10:46
Message-ID: alpine.LNX.2.20.2107141408210.28523@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Wed, 14 Jul 2021, Adrian Klaver wrote:

> Where are c.nbr and a.* coming from? If they are supposed to be table
> qualified values this will not work.

Adrian,

From the psql shell version.

> Also it is sql.Identifier.

Thanks; I certainly missed that.

> This will not work, if for no other reason that 'companies as c on
> c.org_nbr = p.org_nbr', etc are not identifiers and it is sql.Identifier.
>
> Also it would be simpler for this case just to create a quoted statement,
> something like:
> """SELECT
> fld_1, fld_2, fld_3
> FROM
> some_table AS st
> JOIN
> another_table AS a
> ON
> st.id = a.a_id
> WHERE
> st.fld_1 = 'something'
> """

Got it, thanks.

Sorting out the proper format for my queries will take a bit of time. You've
helped shorten the time frame.

Regards,

Rich

In response to

Browse psycopg by date

  From Date Subject
Next Message Rich Shepard 2021-07-14 21:20:49 RE: New user questions
Previous Message David Raymond 2021-07-14 19:09:04 RE: New user questions