If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Alter column to VARGRAPHIC ends in SQL0191

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-30-10, 07:26
tsluijter tsluijter is offline
Registered User
 
Join Date: Nov 2010
Location: The Netherlands
Posts: 12
Alter column to VARGRAPHIC ends in SQL0191

Hi,

I want to alter VARCHAR columns to VARGRAPHIC, to support multibyte characters.
(If I define a column as 20, I don't meen 20 bytes but 20 characters. That's why I want to use the VARGRAPHIC).

On certain tables/columns the alter runs without any problem.
But with one table/column I get an SQL0901 error.

I use the command ALTER TABLE <table> ALTER COLUMN <column> SET DATATYPE VARGRAPHIC(<length>)

The SQL0191 explains there's an improperly formed multi-byte character.

How can I find what character/row causes the problem?

Thanks, Tinie Sluijter
Reply With Quote
  #2 (permalink)  
Old 11-30-10, 11:09
tsluijter tsluijter is offline
Registered User
 
Join Date: Nov 2010
Location: The Netherlands
Posts: 12
Thumbs up Found the solution

Found the solution myself.

When using the statement
select id, vargraphic(<column>) from <table> order by id" > vargraphic.txt
the select stops if the vargraphic stops at an error.

At that point you know where to search in the table, and solve the problem.
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

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