error creating table with vargraphic column -- please help!!! 
Author Message
 error creating table with vargraphic column -- please help!!!

Hi,

I created a DB2 UTF-8 database running on Windows 2000 professional.
When I was trying to create a column with
vargraphic datatype with default value, it was causing an error as follows.

I am trying to find out what I am doing wrong or it is a bug on DB2 on Win2K
Any help or comment would be greatly appreciated...

Here is my sample DDL:
=======
CREATE DATABASE MYTEST
ON C:
ALIAS MYTEST
USING CODESET UTF-8 TERRITORY US
COLLATE USING SYSTEM;

CREATE TABLE MYTABLE1
(
    DBKY        INTEGER          NOT NULL ,
    UPDATEUSER  VARGRAPHIC(32)   NOT NULL
                WITH DEFAULT USER
)
IN USERSPACE1
========

The error I am getting to create table with the above SQL statement is:
=========
DB21034E  The command was processed as an SQL statement because it was not a
valid Command Line Processor command.  During SQL processing it returned:
SQL0901N  The SQL statement failed because of a non-severe system error.
Subsequent SQL statements can be processed.  (Reason "Unexpected cast
function".)  SQLSTATE=58004
=========

I guess that it does not understand the "USER" casting function.
Would it be a bug on DB2 runing on Windows 2000 professional?

Thanks.



Sun, 09 May 2004 04:28:18 GMT
 error creating table with vargraphic column -- please help!!!

SQL Reference Chapter 6 SQL Statement - Create Table, "If USER is specified,
the data type of the column must be a character string with a length not
less than the length attribute of USER".  USER is not supported for
vargraphic data type.

Sherman


Quote:
> Hi,

> I created a DB2 UTF-8 database running on Windows 2000 professional.
> When I was trying to create a column with
> vargraphic datatype with default value, it was causing an error as
follows.

> I am trying to find out what I am doing wrong or it is a bug on DB2 on
Win2K
> Any help or comment would be greatly appreciated...

> Here is my sample DDL:
> =======
> CREATE DATABASE MYTEST
> ON C:
> ALIAS MYTEST
> USING CODESET UTF-8 TERRITORY US
> COLLATE USING SYSTEM;

> CREATE TABLE MYTABLE1
> (
>     DBKY        INTEGER          NOT NULL ,
>     UPDATEUSER  VARGRAPHIC(32)   NOT NULL
>                 WITH DEFAULT USER
> )
> IN USERSPACE1
> ========

> The error I am getting to create table with the above SQL statement is:
> =========
> DB21034E  The command was processed as an SQL statement because it was not
a
> valid Command Line Processor command.  During SQL processing it returned:
> SQL0901N  The SQL statement failed because of a non-severe system error.
> Subsequent SQL statements can be processed.  (Reason "Unexpected cast
> function".)  SQLSTATE=58004
> =========

> I guess that it does not understand the "USER" casting function.
> Would it be a bug on DB2 runing on Windows 2000 professional?

> Thanks.



Mon, 10 May 2004 06:24:37 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Help, strange CREATE TABLE Error with Computed Column

2. need help please:joined tables,add new entries based on one table columns

3. need help please:joined tables,add new entries based on one table columns

4. Access a VARGRAPHIC column from a Stored procedure using ADO

5. Remove all trailings blanks from a VarGraphic column

6. Please help: Creating an index on a temporary table

7. Please help with a SP: Missing rows in table created from comma separated values

8. Please help: Creating a table in a sql server database

9. Please help with dropping and creating the same table

10. Please help me create a Sybase ASA table.

11. Creating Database tables from datasets - Please help.


 
Powered by phpBB® Forum Software