Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #589

Re: Returning a table in SQL

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.databases.postgresql
Subject Re: Returning a table in SQL
Date Tue, 26 Aug 2014 22:28:01 +0200
Lines 25
Message-ID <c648uiF3fjsU1@mid.individual.net> (permalink)
References <ltignr$1hgl$1@adenine.netfront.net> <c644cpF2g32U1@mid.individual.net>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net J2844Xkn+dKVP5juKIR/tQ8+DsaNPzBmOGs3vY+YQI7thJpeA=
Cancel-Lock sha1:sgdwJzzv36VUyXMviH/koRhW4mk=
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0
In-Reply-To <c644cpF2g32U1@mid.individual.net>
Xref csiph.com comp.databases.postgresql:589

Show key headers only | View raw


On 26.08.2014 21:10, Harry Tuttle wrote:

> You need to use the function like a table if it returns a table:
>
> with report as (
>      select *
>      fromsome_report('Customer','2014-08-01','2014-08-08')
> )
> select *
> from report

I guess there is a space missing between "from" and "some_report".

It seems a simpler variant would be

select *
from some_report('Customer','2014-08-01','2014-08-08')

Or does that not work?  (I do have no PG available for testing right now.)

Kind regards

	robert

Back to comp.databases.postgresql | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Returning a table in SQL "AP" <unixpro-nospam@verizon.spam.net> - 2014-08-26 13:39 -0400
  Re: Returning a table in SQL Harry Tuttle <SOZRBLNTLEEE@spammotel.com> - 2014-08-26 21:10 +0200
    Re: Returning a table in SQL Robert Klemme <shortcutter@googlemail.com> - 2014-08-26 22:28 +0200
      Re: Returning a table in SQL Harry Tuttle <SOZRBLNTLEEE@spammotel.com> - 2014-08-26 23:34 +0200
        Re: Returning a table in SQL Robert Klemme <shortcutter@googlemail.com> - 2014-08-27 08:36 +0200
    Re: Returning a table in SQL "AP" <unixpronospam@verizon.net> - 2014-08-27 16:37 -0400
      Re: Returning a table in SQL Harry Tuttle <SOZRBLNTLEEE@spammotel.com> - 2014-08-28 17:51 +0200
        Re: Returning a table in SQL Robert Klemme <shortcutter@googlemail.com> - 2014-08-28 21:45 +0200
        Re: Returning a table in SQL Jasen Betts <jasen@xnet.co.nz> - 2014-08-30 05:45 +0000
        Re: Returning a table in SQL "AP" <unixpronospam@verizon.net> - 2014-09-01 03:02 -0400
          Re: Returning a table in SQL Jasen Betts <jasen@xnet.co.nz> - 2014-09-01 10:56 +0000
            Re: Returning a table in SQL "AP" <unixpronospam@verizon.net> - 2014-09-04 02:57 -0400
              Re: Returning a table in SQL Jasen Betts <jasen@xnet.co.nz> - 2014-09-04 11:21 +0000
  Re: Returning a table in SQL Lennart Jonsson <erik.lennart.jonsson@gmail.com> - 2014-08-27 19:33 +0200

csiph-web