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.

3 posts in General Discussion Last posting was on 2005-06-27 19:54:26.0Z
Eddie Sizemore Posted on 2005-06-22 18:45:16.0Z
From: "Eddie Sizemore" <esizemoreno@spamqx.net>
Newsgroups: ianywhere.public.general
Subject:
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-Original-NNTP-Posting-Host: 12-203-198-23.client.insightbb.com
Message-ID: <42b9b1b8$1@forums-2-dub>
X-Original-Trace: 22 Jun 2005 11:45:12 -0700, 12-203-198-23.client.insightbb.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 22 Jun 2005 11:45:13 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 22 Jun 2005 11:45:16 -0700
X-Trace: forums-1-dub 1119465916 10.22.108.75 (22 Jun 2005 11:45:16 -0700)
X-Original-Trace: 22 Jun 2005 11:45:16 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4579
Article PK: 8385

If I have a table with the following def how do I change the FaxInvoice
Column to allow NULLS
ALTER TABLE "DBA"."Customer" ADD "FaxInvoice" INTEGER NOT NULL
CHECK(@COLUMN IN (0,1));


If I try the following it still show up in sybase central as not allowing
nulls.
ALTER TABLE "DBA"."Customer" MODIFY "FaxInvoice" INTEGER NULL;

I can drop the check by setting it to null but it still will not allow nulls
on insert

Eddie Sizemore


Stephen Rice Posted on 2005-06-23 15:02:24.0Z
From: Stephen Rice <NSsrice@ianywhere.com>
Reply-To: NSsrice@ianywhere.com
Organization: iAnywhere Solutions
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re:
References: <42b9b1b8$1@forums-2-dub>
In-Reply-To: <42b9b1b8$1@forums-2-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: srice-laptop.sybase.com
X-Original-NNTP-Posting-Host: srice-laptop.sybase.com
Message-ID: <42bacf00$1@forums-1-dub>
Date: 23 Jun 2005 08:02:24 -0700
X-Trace: forums-1-dub 1119538944 10.25.98.210 (23 Jun 2005 08:02:24 -0700)
X-Original-Trace: 23 Jun 2005 08:02:24 -0700, srice-laptop.sybase.com
Lines: 44
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4589
Article PK: 8395


Eddie Sizemore wrote:
> If I have a table with the following def how do I change the FaxInvoice
> Column to allow NULLS
> ALTER TABLE "DBA"."Customer" ADD "FaxInvoice" INTEGER NOT NULL
> CHECK(@COLUMN IN (0,1));
>
>
> If I try the following it still show up in sybase central as not allowing
> nulls.
> ALTER TABLE "DBA"."Customer" MODIFY "FaxInvoice" INTEGER NULL;
>
> I can drop the check by setting it to null but it still will not allow nulls
> on insert
>
> Eddie Sizemore
>
>

I tried the following in v9.0.2.2451 with no problem (I was connected to
the sample db asademo)

create table t1 (
col1 integer not null,
col2 integer not null CHECK(@COLUMN IN (0,1)),
primary key (col1));

insert into t1 values (1,1);
insert into t1 values (2,0);
commit;
alter table t1 modify col2 null;
insert into t1 values (3,NULL);
commit;

The change shows up in Sybase Central correctly. Is it possible you
need to refresh the table display?

/steve
--
Stephen Rice
Technical Services Manager
iAnywhere Solutions

--- Please Post ---
Whitepapers, Tech Docs, Solved Cases, Bug Fixes and
"Report a bug" are all available on www.ianywhere.com


Stephen Rice Posted on 2005-06-27 19:54:26.0Z
From: Stephen Rice <NSsrice@ianywhere.com>
Reply-To: NSsrice@ianywhere.com
Organization: iAnywhere Solutions
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re:
References: <42b9b1b8$1@forums-2-dub> <42bacf00$1@forums-1-dub>
In-Reply-To: <42bacf00$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: srice-laptop.sybase.com
Message-ID: <42c0596e$1@forums-2-dub>
X-Original-Trace: 27 Jun 2005 12:54:22 -0700, srice-laptop.sybase.com
Lines: 53
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 27 Jun 2005 12:54:23 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 27 Jun 2005 12:54:26 -0700
X-Trace: forums-1-dub 1119902066 10.22.108.75 (27 Jun 2005 12:54:26 -0700)
X-Original-Trace: 27 Jun 2005 12:54:26 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4591
Article PK: 8397


Stephen Rice wrote:
> Eddie Sizemore wrote:
>
>> If I have a table with the following def how do I change the
>> FaxInvoice Column to allow NULLS
>> ALTER TABLE "DBA"."Customer" ADD "FaxInvoice" INTEGER NOT NULL
>> CHECK(@COLUMN IN (0,1));
>>
>>
>> If I try the following it still show up in sybase central as not
>> allowing nulls.
>> ALTER TABLE "DBA"."Customer" MODIFY "FaxInvoice" INTEGER NULL;
>>
>> I can drop the check by setting it to null but it still will not allow
>> nulls on insert
>>
>> Eddie Sizemore
>>
>>
> I tried the following in v9.0.2.2451 with no problem (I was connected to
> the sample db asademo)
>
> create table t1 (
> col1 integer not null,
> col2 integer not null CHECK(@COLUMN IN (0,1)),
> primary key (col1));
>
> insert into t1 values (1,1);
> insert into t1 values (2,0);
> commit;
> alter table t1 modify col2 null;
> insert into t1 values (3,NULL);
> commit;
>
> The change shows up in Sybase Central correctly. Is it possible you
> need to refresh the table display?
>
> /steve

For posterity :)

see the later thread for a more complete answer - having both the
datatype and the NULL in the same alter turned up a bug

/steve

--
Stephen Rice
Technical Services Manager
iAnywhere Solutions

--- Please Post ---
Whitepapers, Tech Docs, Solved Cases, Bug Fixes and
"Report a bug" are all available on www.ianywhere.com