Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Sybase 12.5.4 table create is not allow with column name start with character "#"

5 posts in General Discussion Last posting was on 2011-07-30 13:56:44.0Z
John Posted on 2011-07-26 09:00:10.0Z
From: "John" <johntlf@hotmail.com>
Newsgroups: sybase.public.ase.general
Subject: Sybase 12.5.4 table create is not allow with column name start with character "#"
Lines: 12
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e2e821a$1@forums-1-dub>
Date: 26 Jul 2011 02:00:10 -0700
X-Trace: forums-1-dub 1311670810 10.22.241.152 (26 Jul 2011 02:00:10 -0700)
X-Original-Trace: 26 Jul 2011 02:00:10 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30378
Article PK: 72556

It is found that Sybase 12.5.4 table cannot create with column name starting
with character "#".
However, it is working fine with current Sybase 12.5.2. Is can be fix for
change the any of system setting?

Create table syntax :
Create table tab( #columnA integer)

Error :
The name '#columnA' is not a valid identifier.


Mark A. Parsons Posted on 2011-07-26 14:19:34.0Z
Sender: 7476.4e2ec9dc.1804289383@sybase.com
From: Mark A. Parsons
Newsgroups: sybase.public.ase.general
Subject: Re: Sybase 12.5.4 table create is not allow with column name start with character "#"
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4e2eccf6.75d7.1681692777@sybase.com>
References: <4e2e821a$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 26 Jul 2011 07:19:34 -0700
X-Trace: forums-1-dub 1311689974 10.22.241.41 (26 Jul 2011 07:19:34 -0700)
X-Original-Trace: 26 Jul 2011 07:19:34 -0700, 10.22.241.41
Lines: 30
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30379
Article PK: 72557

Somewhere around 12.5.3/12.5.4 Sybase
addressed/implemented/fixed the following CR:

=================================
CR # 397665

Description: ASE incorrectly allows identifiers that start
with a pound sign (#) to be used as column names. All
column-names defined in a CREATE TABLE, CREATE VIEW
statement and in the column-list of a derived table
expression are now checked against the rules for valid
identifiers as stated in the standard documentation.
=================================

Net result is that column names beginning with a '#' are no
longer valid in ASE as of some release of 12.5.3/12.5.4.

> It is found that Sybase 12.5.4 table cannot create with
> column name starting with character "#".
> However, it is working fine with current Sybase 12.5.2.
> Is can be fix for change the any of system setting?
>
> Create table syntax :
> Create table tab( #columnA integer)
>
> Error :
> The name '#columnA' is not a valid identifier.
>
>


Michael Peppler [Team Sybase] Posted on 2011-07-28 04:55:46.0Z
From: "Michael Peppler [Team Sybase]" <mpeppler@peppler.org>
Organization: Peppler Consulting SARL
Subject: Re: Sybase 12.5.4 table create is not allow with column name start with character "#"
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-ID: <pan.2011.07.28.04.55.45.714745@peppler.org>
Newsgroups: sybase.public.ase.general
References: <4e2e821a$1@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 27 Jul 2011 21:55:46 -0700
X-Trace: forums-1-dub 1311828946 10.22.241.152 (27 Jul 2011 21:55:46 -0700)
X-Original-Trace: 27 Jul 2011 21:55:46 -0700, vip152.sybase.com
Lines: 20
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30381
Article PK: 72558


On Tue, 26 Jul 2011 02:00:10 -0700, John wrote:

> It is found that Sybase 12.5.4 table cannot create with column name
> starting with character "#".
> However, it is working fine with current Sybase 12.5.2. Is can be fix
> for change the any of system setting?
>
> Create table syntax :
> Create table tab( #columnA integer)
>
> Error :
> The name '#columnA' is not a valid identifier.

Inn addition to what Mark said - you can get around it (sort of) by
quoting the column name:

create table tab( [#columnA] int)

Michael


"Mark A. Parsons" <iron_horse Posted on 2011-07-28 21:37:17.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Sybase 12.5.4 table create is not allow with column name start with character "#"
References: <4e2e821a$1@forums-1-dub> <pan.2011.07.28.04.55.45.714745@peppler.org>
In-Reply-To: <pan.2011.07.28.04.55.45.714745@peppler.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e31d68d$1@forums-1-dub>
Date: 28 Jul 2011 14:37:17 -0700
X-Trace: forums-1-dub 1311889037 10.22.241.152 (28 Jul 2011 14:37:17 -0700)
X-Original-Trace: 28 Jul 2011 14:37:17 -0700, vip152.sybase.com
Lines: 56
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30398
Article PK: 72577

Yeah, I tried the quoted identifier route but that failed (in 12.5.4 and 15.0.3) for me:

============================
create table tab ([#columnA] int)
go

Msg 11717, Level 15, State 2:
Server 'CC1', Line 1:
The quoted identifier '[#columnA]' is illegal because its first character is '#', which is ambiguous. Please use another
character instead.

set quoted_identifier on
go
create table tab ([#columnA] int)
go

Msg 11717, Level 15, State 2:
Server 'CC1', Line 1:
The quoted identifier '[#columnA]' is illegal because its first character is '#', which is ambiguous. Please use another
character instead.

set quoted_identifier on
go
create table tab ("#columnA" int)
go

Msg 11717, Level 15, State 2:
Server 'CC1', Line 1:
The quoted identifier '"#columnA"' is illegal because its first character is '#', which is ambiguous. Please use another
character instead.
============================

If you got this working ... what version? did you have to enable any TFs for 'set' options?

On 07/28/2011 00:55, Michael Peppler [Team Sybase] wrote:
> On Tue, 26 Jul 2011 02:00:10 -0700, John wrote:
>
>> It is found that Sybase 12.5.4 table cannot create with column name
>> starting with character "#".
>> However, it is working fine with current Sybase 12.5.2. Is can be fix
>> for change the any of system setting?
>>
>> Create table syntax :
>> Create table tab( #columnA integer)
>>
>> Error :
>> The name '#columnA' is not a valid identifier.
>
> Inn addition to what Mark said - you can get around it (sort of) by
> quoting the column name:
>
> create table tab( [#columnA] int)
>
> Michael
>


Michael Peppler [Team Sybase] Posted on 2011-07-30 13:56:44.0Z
From: "Michael Peppler [Team Sybase]" <mpeppler@peppler.org>
Organization: Peppler Consulting SARL
Subject: Re: Sybase 12.5.4 table create is not allow with column name start with character "#"
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-ID: <pan.2011.07.30.13.56.43.844815@peppler.org>
Newsgroups: sybase.public.ase.general
References: <4e2e821a$1@forums-1-dub> <pan.2011.07.28.04.55.45.714745@peppler.org> <4e31d68d$1@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 30 Jul 2011 06:56:44 -0700
X-Trace: forums-1-dub 1312034204 10.22.241.152 (30 Jul 2011 06:56:44 -0700)
X-Original-Trace: 30 Jul 2011 06:56:44 -0700, vip152.sybase.com
Lines: 20
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30427
Article PK: 72605


On Thu, 28 Jul 2011 14:37:17 -0700, Mark A. Parsons wrote:

> Yeah, I tried the quoted identifier route but that failed (in 12.5.4 and
> 15.0.3) for me:
>
> ============================
> create table tab ([#columnA] int)
> go
>
> Msg 11717, Level 15, State 2:
> Server 'CC1', Line 1:
> The quoted identifier '[#columnA]' is illegal because its first character
> is '#', which is ambiguous. Please use another character instead.

Interesting.

Which just shows that you (i.e. me!) should test things before posting :-)

Michael