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.

Modify column datatype

2 posts in General Discussion Last posting was on 2011-05-04 14:05:01.0Z
Deepak P V Posted on 2011-05-04 07:42:37.0Z
Sender: 72e0.4dc10208.1804289383@sybase.com
From: Deepak P V
Newsgroups: sybase.public.iq
Subject: Modify column datatype
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4dc1036d.7316.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 May 2011 00:42:37 -0700
X-Trace: forums-1-dub 1304494957 10.22.241.41 (4 May 2011 00:42:37 -0700)
X-Original-Trace: 4 May 2011 00:42:37 -0700, 10.22.241.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4354
Article PK: 246493

Hi,

I am not able to modify datatype of a column in sybase IQ.
I am getting below error. Please advice on how to modify
datatype

Thanks,
Deepak

Error:
1> ALTER TABLE XYZ modify SOURCE VARCHAR(100)
2> go
Msg 21, Level 14, State 0:
SQL Anywhere Error -1013024: ALTER TABLE MODIFY <column>
<datatype> is not
supported.
-- (db_alter.cxx 436)
1>


Harpreet Chaudhary [Sybase, an SAP Company] Posted on 2011-05-04 14:05:01.0Z
From: "Harpreet Chaudhary [Sybase, an SAP Company]" <harpreet.chaudhary@sybase.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6
MIME-Version: 1.0
Newsgroups: sybase.public.iq
Subject: Re: Modify column datatype
References: <4dc1036d.7316.1681692777@sybase.com>
In-Reply-To: <4dc1036d.7316.1681692777@sybase.com>
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: <4dc15d0d$1@forums-1-dub>
Date: 4 May 2011 07:05:01 -0700
X-Trace: forums-1-dub 1304517901 10.22.241.152 (4 May 2011 07:05:01 -0700)
X-Original-Trace: 4 May 2011 07:05:01 -0700, vip152.sybase.com
Lines: 26
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4355
Article PK: 246494

You cannot modify datatype of a column after it has been created. You
will have to create a new column with the new datatype , if you have
data in the old column then move the data to the new column and then
drop the old column.

HTH

On 5/4/2011 3:42 AM, Deepak P V wrote:
> Hi,
>
> I am not able to modify datatype of a column in sybase IQ.
> I am getting below error. Please advice on how to modify
> datatype
>
> Thanks,
> Deepak
>
> Error:
> 1> ALTER TABLE XYZ modify SOURCE VARCHAR(100)
> 2> go
> Msg 21, Level 14, State 0:
> SQL Anywhere Error -1013024: ALTER TABLE MODIFY<column>
> <datatype> is not
> supported.
> -- (db_alter.cxx 436)
> 1>