Re: Unable to Query Column With Same Name as Keyword

Anthony Gerhardt <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <CAE-x_ahOQ0NQgRUu6fAVtZXE4c+kCiFzRxRZuEscKGnw32BR6Q@mail.gmail.com>
That fixed it.  Had to use $dbh->{syb_quoted_identifier} = 1;

Thanks

On Fri, Sep 16, 2011 at 9:32 AM, tiger peng <[email protected]> wrote:

> check quote and quote_identifier method.
>
> ------------------------------
> *From:* Anthony Gerhardt <[email protected]>
> *To:* [email protected]
> *Sent:* Thursday, September 15, 2011 2:10 PM
> *Subject:* Unable to Query Column With Same Name as Keyword
>
> I've got a query in Sybase IQ 15.1:
>
> SET quoted_identifier on
> SELECT col."default"
> FROM  systabcol col
>
> Which runs fine in my query tool (QTODBC 70).  However the same query
> in PerlDBI is return an error:
>
> DBD::Sybase::db selectcol_arrayref failed: Server message number=102
> severity=15 state=0 line=0 text=SQL Anywhere Error -131: Syntax error
> near 'default' on line 2
> [for Statement "
>                 SET quoted_identifier on
>                 SELECT col."default"
>                 FROM  systabcol col
> "]
>
> I've also tried \"default\".
>
>
>
>
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.