Le 19/01/07, Thiebaut Jean-Luc<[EMAIL PROTECTED]> a écrit :
Bonjour,
Bonjour,

est-il possible de passer d'un type de champ
        "Texte [VARCHAR]"
vers
        "Texte [VARCHAR_IGNORECASE]"
de même longueur et sans perte de données ?

Pas directement apparemment :
oBase veut détruire le champ existant et recréer un champ de même nom
avec le nouveau type,
mais avec pertes de données.

Existe-t-il un truc, une méthode ?
je voudrais éviter de devoir détruire la table (problème de tables liées
entre-elles et de formulaires)
ou de devoir réimporter les données...
il va falloir utiliser des instructions sql.
Par Outils > SQL, exécuter :

ALTER TABLE "LaTable" ALTER COLUMN "LeChampVarchar" VARCHAR_IGNORECASE

puis
Affichage > Actualiser les tables.

Attention, quelques restrictions (ectrait doc hsqldb) :
ALTER TABLE <tablename> ALTER COLUMN <columnDefinition>;
This form of ALTER TABLE ALTER COLUMN accepts a columnDefinition as in
a CREATE TABLE command, with the following restrictions.

Restrictions

The column must be already be a PK column to accept an IDENTITY definition.
If the column is already an IDENTITY column and there is no IDENTITY
definition, the existing IDENTITY attribute is removed.
The default expression will be that of the new definition, meaning an
existing default can be dropped by ommission, or a new default added.
The NOT NULL attribute will be that of the new definition (similar to
previous item).
Depending on the type of change, the table may have to be empty for
the command to work. It always works when the type of change is
possible in general and the individual existing values can all be
converted.



Merci de vos suggestions,
    Jean-Luc

Manuel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to