On Friday, May 14, 2021, Durumdara wrote:
>
> Is there any way to suppress the original field?
>
Remove the star and list the other columns you do want.
>
> Or say to PGSQL to skip the first XDate field?
>
> Like select t.* (EXCEPT XDate) from t
>
No, though I’ve expressed a desire for this
On 14/05/21, Durumdara (durumd...@gmail.com) wrote:
> ...
> midqry1 as (
> select coalesce(XDate , '0001-01-01'), * from prevqry
> ),
> midqry2 as (
> select ArtID, max(XDate) as Max_XDate from midqry1
> where acq = True
> group by ArtID
> )
> ...
>
> Result: ERROR: column reference "XDate
Hello!
I have a big "WITH QUERY", with many subqueries.
I have a date field, named "XDate".
In the middle I duplicated this field:
...
midqry1 as (
select coalesce(XDate , '0001-01-01'), * from prevqry
),
midqry2 as (
select ArtID, max(XDate) as Max_XDate from midqry1
where acq = True