Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > DB2 > Problems with create table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-10-02, 11:28
SamuelSt SamuelSt is offline
Registered User
 
Join Date: Jan 2002
Posts: 1
Problems with create table

Hi there,

I am trying to create a new table with an auto number as the primary key. However, I don't know why I keep getting the 'datalink' error? Any ideas?

- S


CREATE TABLE DS (id integer NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 0, INCREMENT BY 1, NO CACHE), user_id BIGINT(8) NOT NULL, trans_type SMALLINT (2), comment VARCHAR (100), user_type SMALLINT(2), vat VARCHAR (30), date TIMESTAMP WITH DEFAULT CURRENT TIMESTAMP, PRIMARY KEY (id)) DATA CAPTURE NONE IN DATATS INDEX IN INDEXTS

Produces the following error:

DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "BIGINT" was found following ", NO CACHE), user_id". Expected tokens may include: "DATALINK". SQLSTATE=42601

Last edited by SamuelSt : 01-10-02 at 11:31.
Reply With Quote
  #2 (permalink)  
Old 01-14-02, 06:43
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 3,641
Re: Problems with create table

Use just BIGINT instead of BIGINT(8) .....

Cheers

Sathyaram[

QUOTE]Originally posted by SamuelSt
Hi there,

I am trying to create a new table with an auto number as the primary key. However, I don't know why I keep getting the 'datalink' error? Any ideas?

- S


CREATE TABLE DS (id integer NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 0, INCREMENT BY 1, NO CACHE), user_id BIGINT(8) NOT NULL, trans_type SMALLINT (2), comment VARCHAR (100), user_type SMALLINT(2), vat VARCHAR (30), date TIMESTAMP WITH DEFAULT CURRENT TIMESTAMP, PRIMARY KEY (id)) DATA CAPTURE NONE IN DATATS INDEX IN INDEXTS

Produces the following error:

DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "BIGINT" was found following ", NO CACHE), user_id". Expected tokens may include: "DATALINK". SQLSTATE=42601
[/quote]
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On