Subject Re: [IBO] IBOGrid and varchar problem
Author Helen Borrie
At 01:32 PM 21/01/2005 +0000, you wrote:


> > For Firebird 1.5.x:
> >
> > 1) Create new field as varchar(200);
> > 2) UPDATE TableName
> > SET NewVC200FieldName=SUBSTRING(OldVC10000FieldName FROM 1 FOR
>200);
>
>
>Reports the same error with string truncation although I am sure it
>shouldn't.

No, it shouldn't. If you need more detail, follow these steps:

(from Dmitry)

1) Create new field as varchar(200);

ALTER TABLE tableName
ADD NewVC200FieldName VARCHAR(200);
COMMIT;

2)
UPDATE TableName
SET NewVC200FieldName=SUBSTRING(OldFieldName FROM 1 FOR 200);
COMMIT;

3)
ALTER TABLE tableName
DROP OldFieldName;
COMMIT;

4)
ALTER TABLE tableName
ADD OldFieldName VARCHAR(200);
COMMIT;

5)
UPDATE TableName
SET OldFieldName=NewVC10000FieldName;
COMMIT;

6)
ALTER TABLE tableName
DROP NewVC10000FieldName;
COMMIT;

Helen