Ver Mensaje Individual
  #17  
Antiguo 09-04-2018
orodriguezca orodriguezca is offline
Miembro
 
Registrado: ene 2009
Posts: 221
Reputación: 16
orodriguezca Va por buen camino
Cita:
Empezado por Angel.Matilla Ver Mensaje
Y, por cierto, ¿a qué collation te refieres?
Me refiero a que cuando se crea una tabla se puede definir el collation_name de cada una de las columnas de tipo carácter. El siguiente es un fragmento de la sintaxis de la sentencia Create Table:

CREATE TABLE
Used for: creating a new table (relation)
Available in: DSQL, ESQL

Syntax:
CREATE [GLOBAL TEMPORARY] TABLE tablename
[EXTERNAL [FILE] '<filespec>']
(<col_def> [, {<col_def> | <tconstraint>} ...])
[ON COMMIT {DELETE | PRESERVE} ROWS];

<col_def> ::= <regular_col_def> | <computed_col_def>

<regular_col_def> ::=
colname {<datatype> | domainname}
[DEFAULT {literal | NULL | <context_var>}]
[NOT NULL]
[<col_constraint>]
[COLLATE collation_name]

Si se trata de establecer una integridad referencial entre dos tabla, entre columnas varchar, y si las columnas varchar tienen diferente collation_name saltará el error: Partner index segment no 1 has incompatible data type

En preguntas frecuentes de Firebird se encuentra lo siguiente:

"Partner index segment no 1 has incompatible data type

This usually means that the field in the foreign key you're trying to create has a different data type then the field of the primary key column it is referencing.

The difference can be subtle, anything that affects index (even field collation) is taken info account.

To solve this problem, usually the right thing to do is to change the data type of the foreign key columns before creating the foreign key constraint.
"



Edito: De ser posible borrar (drop table, no delete) ambas tablas y vuelve a crearlas.
Responder Con Cita