Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/03/2012, 12:14
augusto_jaramil
 
Fecha de Ingreso: junio-2004
Ubicación: Ciudad de Panama
Mensajes: 551
Antigüedad: 19 años, 10 meses
Puntos: 8
Pregunta Error en particionamiento de tabla

Hola a tod@s,

Estoy intentando hacer un particionamiento de tablas de la siguiente manera:

Código PHP:
CREATE TABLE movi (
    
comprob character(3NOT NULL,
    
numero bigint NOT NULL,
    
fecha date NOT NULL,
    
cuenta character(12NOT NULL,
    
nit numeric(15,0NOT NULL,
    
centro character(8NOT NULL,
    
valor numeric(16,2NOT NULL,
    
deb_cre character(1NOT NULL,
    
descripcion character(60),
    
tipo_doc character(3),
    
numero_doc numeric(10,0),
    
conciliado character(1),
    
cuenta_t character(12),
    
base numeric(16,2),
    
fecha_grab date,
    
grabador character(20),
    
nota character(1),
    
f_vence date,
    
concepto integer,
    
activi character(8),
    
cod_acti character(8),
    
c7_obid integer
)
PARTITION BY RANGE fecha ) (
    
PARTITION movi_2006_2007 VALUES LESS THAN (2008-01-01),
    
PARTITION movi_2008_06 VALUES LESS THAN (2008-07-01),
    
PARTITION movi_2008_12 VALUES LESS THAN (2009-01-01),
    
PARTITION movi_2009_06 VALUES LESS THAN (2009-07-01),
    
PARTITION movi_2009_12 VALUES LESS THAN (2010-01-01),
    
PARTITION movi_2010_06 VALUES LESS THAN (2010-07-01),
    
PARTITION movi_2010_12 VALUES LESS THAN (2011-01-01),
    
PARTITION movi_2011_06 VALUES LESS THAN (2011-07-01),
    
PARTITION movi_2011_12 VALUES LESS THAN (2012-01-01),
    
PARTITION movi_2012_06 VALUES LESS THAN (2012-07-01),
    
PARTITION movi_2012_12 VALUES LESS THAN (2013-01-01)
); 
Al ejecutarlo me reporta el siguiente error

#1493 - VALUES LESS THAN value must be strictly increasing for each partition


Segun la documentacion que he encontrado acerca del tema veo que lo hace por anio y deseo hacer que encada particion queden los registros ocurridos por seis meses de cada anio respectivamente.

Como puedo lograr esto? Soy como principiante en el tema de MySQL y pailas... no lo he podido hacer andar....

De antemano gracias por sus aportes

Un Cordial Saludo,