I am trying to make a form in oracle application builder with a column called START_TIME and END_TIME.
Now when I try to view the form I can only see it as DATES and cannot enter any HOURS or MINUTES.
My table was constructed as follows:
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
/
I cannot modify the DATE
My form uses the folowing sources:
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"
However it gives the erorr:
"Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00904: "B": invalid identifier"
If I change the 'b' variable to START_TIME it gives the error:
query column #5 (TO_CHAR("START_TIME",'HH24:MI:SS')) is invalid, use column alias
TO_CHAR("START_TIME", 'HH24:MI:SS') as "ST",
– A.B.Cade