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.

ASIQ Setting up Autoincrement ID Columns?

3 posts in Windows NT Last posting was on 2000-03-03 23:23:44.0Z
Kim Albee Posted on 2000-03-03 04:08:02.0Z
From: "Kim Albee" <kalbee@uswest.net>
Subject: ASIQ Setting up Autoincrement ID Columns?
Date: Thu, 2 Mar 2000 22:08:02 -0600
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <s2rO9YMh$GA.295@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: premiumK26.mpls.uswest.net 209.180.8.26
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2461
Article PK: 1089914

I've just installed ASIQ 12 on NT, and am having difficulty understanding
what happened to the IDENTITY columns -- that autoincrement ID values in a
table.

I've looked all through the technical doc -- and it speaks of the
autoincrement, then refers me to the Create Table statement, which doesn't
mention it at all.

Here's a sample of what I'm attempting to do, but the syntax is incorrect:

CREATE TABLE Center (
center_id int IDENTITY,
center_city_name char(30),
center_mgr_name char (50),
create_date datetime DEFAULT CURRENT_TIMESTAMP)

In addition to the autoincrement center_id column, I am also attempting to
create a column that is automatically populated with the current datetime --
however that doesn't seem to work either.

Any help would be greatly appreciated.


Bret Halford Posted on 2000-03-03 08:17:34.0Z
Message-ID: <38BF751D.C891CF83@sybase.com>
Date: Fri, 03 Mar 2000 01:17:34 -0700
From: Bret Halford <bret@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.5 [en]C-CCK-MCD (WinNT; I)
X-Accept-Language: en,ja
MIME-Version: 1.0
Subject: Re: ASIQ Setting up Autoincrement ID Columns?
References: <s2rO9YMh$GA.295@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 31
NNTP-Posting-Host: bret-pc.sybase.com 157.133.80.211
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2460
Article PK: 1089912


Kim Albee wrote:

> I've just installed ASIQ 12 on NT, and am having difficulty understanding
> what happened to the IDENTITY columns -- that autoincrement ID values in a
> table.
>
> I've looked all through the technical doc -- and it speaks of the
> autoincrement, then refers me to the Create Table statement, which doesn't
> mention it at all.
>
> Here's a sample of what I'm attempting to do, but the syntax is incorrect:
>
> CREATE TABLE Center (
> center_id int IDENTITY,
> center_city_name char(30),
> center_mgr_name char (50),
> create_date datetime DEFAULT CURRENT_TIMESTAMP)
>
> In addition to the autoincrement center_id column, I am also attempting to
> create a column that is automatically populated with the current datetime --
> however that doesn't seem to work either.
>
> Any help would be greatly appreciated.

Hi Kim,

I don't work with IQ, but it is probably similar to ASE in these regards:

1) The IDENTITY property can only be used with the NUMERIC(n,0) datatypes, not
with INT.
2) For the current datetime, use "getdate()", ie "... create_date datetime
default getdate()"

Give the ASE syntax a try...

-bret


Kim Albee Posted on 2000-03-03 23:23:44.0Z
From: "Kim Albee" <kalbee@uswest.net>
References: <s2rO9YMh$GA.295@forums.sybase.com> <38BF751D.C891CF83@sybase.com>
Subject: Re: ASIQ Setting up Autoincrement ID Columns?
Date: Fri, 3 Mar 2000 17:23:44 -0600
Lines: 69
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <0uLeveWh$GA.251@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: premiumK26.mpls.uswest.net 209.180.8.26
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2453
Article PK: 1089905

Bret --

Thanks for the suggestion, however, apparently, it isn't like ASE -- I get
errors whenever I attempt to set a default value in the Create Table
statement, and it doesn't allow the setting of IDENTITY or AUTOINCREMENT on
a Numeric or an Int -- it interprets that as attempting to set a default
value.

So I'm at a loss as to why they'd make this type of a change -- and how to
handle it, which is not addressed in the manuals that come with the product
(at least not that I've been able to find).

Any other suggestions would be MUCH Appreciated -- I'm kind of at a
standstill.

Kim :-)

Bret Halford <bret@sybase.com> wrote in message
news:38BF751D.C891CF83@sybase.com...
>
>
> Kim Albee wrote:
>
> > I've just installed ASIQ 12 on NT, and am having difficulty
understanding
> > what happened to the IDENTITY columns -- that autoincrement ID values in
a
> > table.
> >
> > I've looked all through the technical doc -- and it speaks of the
> > autoincrement, then refers me to the Create Table statement, which
doesn't
> > mention it at all.
> >
> > Here's a sample of what I'm attempting to do, but the syntax is
incorrect:
> >
> > CREATE TABLE Center (
> > center_id int IDENTITY,
> > center_city_name char(30),
> > center_mgr_name char (50),
> > create_date datetime DEFAULT CURRENT_TIMESTAMP)
> >
> > In addition to the autoincrement center_id column, I am also attempting
to
> > create a column that is automatically populated with the current
datetime --
> > however that doesn't seem to work either.
> >
> > Any help would be greatly appreciated.
>
> Hi Kim,
>
> I don't work with IQ, but it is probably similar to ASE in these regards:
>
> 1) The IDENTITY property can only be used with the NUMERIC(n,0) datatypes,
not
> with INT.
> 2) For the current datetime, use "getdate()", ie "... create_date datetime
> default getdate()"
>
> Give the ASE syntax a try...
>
> -bret
>