Re: fetchrow_arrayref, fetchrow_arrayref columns won't parse.

"Garry T. Williams" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <1643513.vnLZfIE6ol@vfr>
On 3-21-13 22:55:51 Garry T. Williams wrote:
> On 3-21-13 21:44:46 dome stuff wrote:
> > my $sth = $dbh->prepare('SELECT (formid, fid, forder, ftype, fsize,
> > fmaxlength, fdesc, flink) FROM fdesc WHERE (formid = ?) ORDER BY forder') ;
> 
> my $sth = $dbh->prepare(<<SQL);
> SELECT formid, fid, forder, ftype, fsize,
>        fmaxlength, fdesc, flink
>   FROM fdesc
>  WHERE formid = ?
>  ORDER BY forder
> SQL
> 
> In other words, lose the parentheses in the SELECT clause.

I should have mentioned that the parentheses constitute a Row
Constructor.  This is a composite Value Expression.  A Row Constructor
is valid in the SELECT clause.

See http://www.postgresql.org/docs/9.2/interactive/queries-select-lists.html#QUERIES-SELECT-LIST-ITEMS 
    http://www.postgresql.org/docs/9.2/interactive/sql-expressions.html .

-- 
Garry T. Williams
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.