Hello. I have a big problem with my querys and my views in SQLStudio. I have
Suse Linux 9.1 and MaxDB 7.6.0.12 (although I have in another PC Suse Linux
8.2 and MaxDB 7.5.0.15 and I have the same problems).
Help me please!
I have a long query that works well:
SELECT "ROOT"."base_histo"."desmar",
"ROOT"."base_histo"."numero_orden_trabajo",
"ROOT"."base_histo"."fecha_a_realizar", "ROOT"."base_histo"."fecha_inicio",
"ROOT"."base_histo"."fecha_final", "ROOT"."base_histo"."cod_mantenimiento",
"ROOT"."base_histo"."descripcion" AS "des_mantenimiento",
"ROOT"."base_histo"."causa_mantenimiento",
"ROOT"."base_histo"."problema_detectado",
"ROOT"."base_histo"."dirigido", "ROOT"."base_histo"."nombre",
"ROOT"."base_histo"."costo_mano_obra", "ROOT"."base_histo"."costo_material",
"ROOT"."base_histo"."costo_ajeno", "ROOT"."base_histo"."tiempo_reparacion",
"ROOT"."base_histo"."codigo", "ROOT"."base_histo"."cod_elemento",
"ROOT"."base_histo"."funcion", "ROOT"."base_histo"."situacion",
"ROOT"."base_histo"."sistema",
"ROOT"."base_histo"."zona", "ROOT"."base_histo"."cod_sistema",
"ROOT"."base_histo"."cod_zona", "ROOT"."trabajos"."prioridad",
"ROOT"."base_histo"."cod_historico", "ROOT"."base_histo"."notas",
"ROOT"."trabajos"."sugerencias", "ROOT"."trabajos"."descripcion_comunicado"
FROM "ROOT"."base_histo","ROOT"."trabajos" WHERE
"ROOT"."base_histo"."cod_historico"= "ROOT"."trabajos"."cod_historico" (+)
In that query the 3 last fields: "ROOT"."base_histo"."notas",
"ROOT"."trabajos"."sugerencias", "ROOT"."trabajos"."descripcion_comunicado"
are long fields. And the 2 first fields: "ROOT"."base_histo"."desmar",
"ROOT"."base_histo"."numero_orden_trabajo" are calculated fields, is that to
say, this fields are union of another fields.
But when I create the corresponding view of that query:
CREATE VIEW "ROOT"."mtto correc para 1 cod_historico"
(
"desmar",
"numero_orden_trabajo",
"fecha_a_realizar",
"fecha_inicio",
"fecha_final",
"cod_mantenimiento",
"des_mantenimiento",
"causa_mantenimiento",
"problema_detectado",
"dirigido",
"nombre",
"costo_mano_obra",
"costo_material",
"costo_ajeno",
"tiempo_reparacion",
"codigo",
"cod_elemento",
"funcion",
"situacion",
"sistema",
"zona",
"cod_sistema",
"cod_zona",
"prioridad",
"cod_historico",
"notas",
"sugerencias",
"descripcion_comunicado"
)
AS SELECT "ROOT"."base_histo"."desmar",
"ROOT"."base_histo"."numero_orden_trabajo",
"ROOT"."base_histo"."fecha_a_realizar", "ROOT"."base_histo"."fecha_inicio",
"ROOT"."base_histo"."fecha_final", "ROOT"."base_histo"."cod_mantenimiento",
"ROOT"."base_histo"."descripcion" AS "des_mantenimiento",
"ROOT"."base_histo"."causa_mantenimiento",
"ROOT"."base_histo"."problema_detectado",
"ROOT"."base_histo"."dirigido", "ROOT"."base_histo"."nombre",
"ROOT"."base_histo"."costo_mano_obra", "ROOT"."base_histo"."costo_material",
"ROOT"."base_histo"."costo_ajeno", "ROOT"."base_histo"."tiempo_reparacion",
"ROOT"."base_histo"."codigo", "ROOT"."base_histo"."cod_elemento",
"ROOT"."base_histo"."funcion", "ROOT"."base_histo"."situacion",
"ROOT"."base_histo"."sistema",
"ROOT"."base_histo"."zona", "ROOT"."base_histo"."cod_sistema",
"ROOT"."base_histo"."cod_zona", "ROOT"."trabajos"."prioridad",
"ROOT"."base_histo"."cod_historico", "ROOT"."base_histo"."notas",
"ROOT"."trabajos"."sugerencias", "ROOT"."trabajos"."descripcion_comunicado"
FROM "ROOT"."base_histo","ROOT"."trabajos" WHERE
"ROOT"."base_histo"."cod_historico"= "ROOT"."trabajos"."cod_historico" (+)
And when I executed this view I have got several errors (Important, the
corresponding query works without errorsl). It depends on the place in which
I put the fields that previously I specified:
"General error;-9205 POS(1) System error: AK Catalog information not
found:0000000000048E00006000"
"General error;-9000 System error: Not yet Implemented
In my experience, when I have errors I know that if I change of place some
fields in views of MaxDB, this views work fine. For example:
- Calculated fields will have to locate at the beginning of view.
- Long fields will have to locate at the end of view.
But in this case, I have change of place this concrete fields (calculated
and long fields) of all the possible ways and IT FOLLOWS WITHOUT WORKING!
I don't know if Maxdb has some type of limitation in the size of the views
or something similar. Or some parameter of the database that I have
incorrectly established.
I NEED HELP URGENTLY! Please, excuse my spelling, but I am Spanish.
Thank you very much in advance.
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]