尝试做错误"水平分区"

时间:2017-12-24 21:52:41

标签: oracle ora-00928

CREATE TABLE "Ticket_particije" (
    ticket_id number,
    datum_kreiranja_ticketa date,
    zalba_id number,
    prodavac_id number,
    pristupni_ugovor_id number,
    constraint pk_ticketparticije primary key (ticket_id),
    constraint fk_ticketparticije_zalba foreign key (zalba_id) references "Zalba" (zalba_id),
    constraint fk_ticketparticije_prodavac foreign key (prodavac_id) references "Prodavac" (prodavac_id),
    constraint fk_ticketparticike_pugovor foreign key (pristupni_ugovor_id) references "PristupniUgovor" (pristupni_ugovor_id)
);
PARTITION BY RANGE (datum_kreiranja_ticketa)
(
PARTITION ticketi_2017_kvartal1 values
LESS THAN (TO_DATE('01-MAR-2017','dd-MON-yyyy')),
PARTITION ticketi_2017_kvartal2 values
LESS THAN (TO DATE('01-JUN-2017','dd-MON-yyyy')),
PARTITION ticketi_2017_kvartal3 values
LESS THAN (TO_DATE('01-SEP-2017','dd-MON-yyyy')),
PARTITION ticketi_2017_kvartal4 values
LESS THAN (TO_DATE('01-DEC-2017','dd-MON-yyyy'))
);

错误:

  

ORA-00928缺少SELECT关键字

不要介意"未知"单词,数据库是塞尔维亚语。如果您需要任何其他信息,不用担心,我会发布。提前谢谢。

1 个答案:

答案 0 :(得分:1)

首先,在temp = "Select * FROM Batiments WHERE Type = " & Chr(34) & txtNouveauBatiment.Value & Chr(34) & ";" rstBatiment.OpenRecordset tmp If (rstBatiment.EOF) Then Set dbs = CurrentDb Set rstBatiment = dbs.OpenRecordset("Batiments") rstBatiment.AddNew rstBatiment!Type = txtNouveauBatiment.Value rstBatiment.Update Refresh End If 子句之前删除分号。 然后, TO &之间缺少下划线。 {em> DATE 位于"partition by range"

试试这个:

"TO DATE('01-JUN-2017','dd-MON-yyyy'))"