Skip to Content.
Sympa Menu

freetds - Re: Sybase error: Identifier too long.....Any help appreciated

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Michael Horowitz" <michael.horowitz AT storagenetworks.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: Sybase error: Identifier too long.....Any help appreciated
  • Date: Thu, 17 Jan 2002 14:47:57 -0500


The max identifier length for Oracle is 30 chars. For MSSQL 6.5 it is 30
too, but for MSSQL 7.0 it is 128. Since you are connecting to Oracle
through SQL Server, maybe there is some comaptibility issue with
identifier lengths. The error message did cut it off at exactly 128
characters though, so it could just be the MSSQL limit. I don't know why
it things that the argument is an identifier instead of a string literal.

--Mike

> Here's the SQL statement I am passing using PHP and FreeTDS on Linux:
>
> $sql = "SELECT LIST_PRICE, ADDR_CITY_NAME, HIGH, BEDS_TOTAL,
> FULL_BATHS_NUM, SQUARE_FOOTAGE, AGENT_NAME, AGENT_PHONE_NUM,
> AGENT_AREA_CODE FROM OPENQUERY(CRISMLS, 'SELECT LIST_PRICE,
> ADDR_CITY_NAME, HIGH, BEDS_TOTAL, FULL_BATHS_NUM, SQUARE_FOOTAGE,
> AGENT_NAME, AGENT_PHONE_NUM, AGENT_AREA_CODE FROM
> KARCHER.ODBC_RESIDENTIAL_VW WHERE ADDR_CITY_NAME LIKE ''%Akron%'' AND
> LIST_PRICE > 100000 AND LIST_PRICE < 150000 AND BEDS_TOTAL > 2 AND
> SQUARE_FOOTAGE > 2000 AND
> FULL_BATHS_NUM > 1')";
>
> The problem I'm having is I get an Identifier too long error (shown below)
> when I attempt to run the query. I'm connecting to an Oracle db by using
> our MSSQL Server with a linked server setup. I'm able to get data if I
> simply select one field, so I know it's not a connection problem. Is
> there a max length setting somewhere that I can raise? Sort of tried
> everything I can think of so far. Thanks for any help.
>
> Warning: Sybase error: The identifier that starts with 'SELECT * FROM
> KARCHER.ODBC_RESIDENTIAL_VW WHERE ADDR_CITY_NAME LIKE '%Akron%' AND
> LIST_PRICE > 100000 AND LIST_PRICE
> < 150000 AN' is too long. Maximum length is 128. (severity 15)
>
> Kevin Sayre
> kevin AT thekarchergroup.com




Archive powered by MHonArc 2.6.24.

Top of Page