我正在尝试在 oracle 应用程序生成器中创建一个表单,其中包含一个名为 START_TIME 和 END_TIME 的列。
现在,当我尝试查看表单时,我只能将其视为 DATES,而无法输入任何 HOURS 或 MINUTES。
我的表构造如下:
CREATE TABLE "MACHINE_SCHEDULE"
( "SCHEDULE_NUMBER" VARCHAR2(100 CHAR),
"MACHINE_NO" VARCHAR2(10 CHAR),
"MACHINE_USE_DATE" DATE,
"START_TIME" DATE,
"END_TIME" DATE,
"PROCESS" VARCHAR2(164 CHAR),
"BATCH_NO" VARCHAR2(10 CHAR),
"MATERIAL_BAR_NO" NUMBER(8,0),
"TECHNICIAN_STAFF_NO" VARCHAR2(15 CHAR),
CONSTRAINT "MACHINE_SCHEDULE_PK" PRIMARY KEY ("SCHEDULE_NUMBER") ENABLE
)
/
ALTER TABLE "MACHINE_SCHEDULE" ADD CONSTRAINT "MACHINE_SCHEDULE_CON" FOREIGN KEY ("TECHNICIAN_STAFF_NO")
REFERENCES "MODULE_TECHNICIAN" ("TECHNICIAN_STAFF_NO") ENABLE
/
ALTER TABLE "MACHINE_SCHEDULE" ADD CONSTRAINT "MACHINE_SCHEDULE_FK" FOREIGN KEY ("BATCH_NO")
REFERENCES "BATCH" ("BATCH_NO") ENABLE
/
ALTER TABLE "MACHINE_SCHEDULE" ADD CONSTRAINT "MACHINE_SCHEDULE_FK2" FOREIGN KEY ("MATERIAL_BAR_NO")
REFERENCES "MATERIAL_BAR" ("MATERIAL_BAR_NO") ENABLE
/
CREATE OR REPLACE TRIGGER "BI_MACHINE_SCHEDULE"
before insert on "MACHINE_SCHEDULE"
for each row
begin
if :NEW."SCHEDULE_INSTANT_NUMBER" is null then
select "MACHINE_SCHEDULE_SEQ".nextval into :NEW."SCHEDULE_INSTANT_NUMBER" from dual;
end if;
end;
/
ALTER TRIGGER "BI_MACHINE_SCHEDULE" DISABLE
/
我无法修改 DATE
我的表格使用以下来源:
select
"SCHEDULE_NUMBER",
"SCHEDULE_NUMBER" SCHEDULE_NUMBER_DISPLAY,
"MACHINE_NO",
"MACHINE_USE_DATE",
"START_TIME" as b,
TO_CHAR(b, 'HH24:MI:SS'),
"END_TIME",
"PROCESS",
"BATCH_NO",
"MATERIAL_BAR_NO",
"TECHNICIAN_STAFF_NO"
from "#OWNER#"."MACHINE_SCHEDULE"
但是它给出了错误:
“无法在 Builder 中解析查询。如果您认为查询在语法上是正确的,请选中区域源下方的“通用列”复选框以继续而不进行解析。ORA-00904:“B”:无效标识符”
如果我将“b”变量更改为 START_TIME,则会出现错误:
查询列 #5 (TO_CHAR("START_TIME",'HH24:MI:SS')) 无效,使用列别名