RE: Error

RE: Error

 

  

I've given the full error message, but I'm not sure you can do what
you're trying to do. First, when I created a table with two decimal(16)
columns, one null and one not null, to test this and then put in a row,
and then tried to alter each one to DEC(16) I got

(db2admn)@(xs95db03)
[/home/db2admn] > alter column col1 set data type DECIMAL(16,4) NOT
NULL" <
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 "DECIMAL" was found following "n col1 set
data
type". Expected tokens may include: "GRAPHIC". SQLSTATE=42601

(db2admn)@(xs95db03)
[/home/db2admn] > alter column col2 set data type DECIMAL(16,4)"
<
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 "alter table RU99.EXPTAB alter column col2
" was
found following "BEGIN-OF-STATEMENT". Expected tokens may include:
"<values>". SQLSTATE=42601

I suspect (at least in V8.2) that the reason you can't do what you're
trying to do is that in the actual online book, it only has SET TYPE for
VARCHAR, CHAR VARYING, and VARGRAPHIC and then the (integer) where
you're changing the length.

(db2admn)@(xs95db03)
[/home/db2admn] > db2 "? SQL0401N"


SQL0401N The data types of the operands for the operation
"<operator>" are not compatible.

Explanation:

The operation "<operator>" appearing within the SQL statement has
a mixture of numeric and nonnumeric operands, or the operation
operands are not compatible.

Federated system users: this data type violation can be at the
data source or at the federated server.

Some data sources do not provide the appropriate values for
"<operator>". In these cases the message token will have the
following format: "<data source>:UNKNOWN", indicating that the
actual value for the specified data source is unknown.

The statement cannot be processed.

User Response:

Check all operand data types to ensure that they are comparable
and compatible with the statement usage.

If all the SQL statement operands are correct and accessing a
view, check the data types of all the view operands.

Federated system users: if the reason is unknown, isolate the
problem to the data source failing the request (see the Problem
Determination Guide for procedures to follow to identify the
failing data source) and examine the data type restrictions for
that data source.

sqlcode : -401

-----Original Message-----
From: Edwards Ed
[mailto:db2udbdba-ezmlmshield-x23195660.[Email address protected]
Sent: Friday, August 03, 2007 7:33 AM
To: LazyDBA Discussion
Subject: RE: Error

Hey Singh Diktesh(Dikky),
What is the matter with you? Huh? Hehe. You know you should always
state your version of your DB2 software and the operating system you are
running on in all your emails to this Group! Hehe.

Anyway, check it out hehe.

http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.
ibm.db2.udb.admin.doc/doc/c0011961.htm

It's Fridayyyyyyy! Partyyyyyyyy! Hehe.

Have a great Day and Weekend!





Please take a few minutes to provide feedback on the quality of service
you received from our staff. The Department of Education values your
feedback as a customer. Commissioner of Education Jeanine Blomberg is
committed to continuously assessing and improving the level and quality
of services provided to you.Simply use the link below. Thank you in
advance for completing the survey.


http://data.fldoe.org/cs/default.cfm?staff=Ed.[Email address protected]




-----Original Message-----
From: Singh Diktesh
[mailto:db2udbdba-ezmlmshield-x9328762.[Email address protected]
Sent: Friday, August 03, 2007 8:20 AM
To: LazyDBA Discussion
Subject: Error


Hi ,

I have given a command to increase column from decimal(16) to
decima(16,4)

ALTER TABLE ARSPM.APMFUNDMGTFEE ALTER COLUMN MIN_MGT_AMT SET DATA TYPE
DECIMAL(16,4)

It gave me error SQLSTATE 42601, -401.

Could any one tell me what can be the problem

Thanks,
Dikky


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -

This message is intended only for the personal and confidential use of
the designated recipient(s) named above. If you are not the intended
recipient of this message you are hereby notified that any review,
dissemination, distribution or copying of this message is strictly
prohibited. This communication is for information purposes only and
should not be regarded as an offer to sell or as a solicitation of an
offer to buy any financial product, an official confirmation of any
transaction, or as an official statement of Lehman Brothers. Email
transmission cannot be guaranteed to be secure or error-free.
Therefore, we do not represent that this information is complete or
accurate and it should not be relied upon as such. All information is
subject to change without notice.





---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



DB2 & UDB email list listserv db2-l LazyDBA home page