What is the query error?
Request:
Create Global Temporary Table `complite_incomplite` (
`Card_Task_id` Int (15) NULL DEFAULT NULL,
`Card_id` Int (15) NULL DEFAULT NULL,
`Tax_code` Varchar (4) NULL DEFAULT NULL,
`REG_OPERATION` Varchar (270) NULL DEFAULT NULL,
`life_situation_name` Varchar (270) NULL DEFAULT NULL,
`Create_ts` DateTime Null Default Null,
`IS_Complete` Varchar (1) NULL DEFAULT NULL,
`Complete_ts` DateTime Null Default Null,
`current_step_id` Varchar (300) NULL DEFAULT NULL,
`prev_Tax_Code` Varchar (4) NULL DEFAULT NULL,
`prev_step_tax_code` Varchar (4) NULL DEFAULT NULL,
`TaxPayer_ID` Varchar (50) NULL DEFAULT NULL,
`reg_tax_code` Varchar (4) NULL DEFAULT NULL,
`in_number` Varchar (20) NULL DEFAULT NULL,
`Receipt_Date` DateTime Null Default Null,
`Registration_date` Date Null Default Null,
`CONTROL_DATE` Date Null Default Null,
`final_date` Date Null Default Null,
`has_interim_answer` Varchar (1) NULL DEFAULT NULL,
`interim_answer_date` DateTime Null Default Null,
`is_repeat` Varchar (1) NULL DEFAULT NULL,
`Description` Varchar (1000) NULL DEFAULT NULL,
`duplicate_status` Varchar (1) NULL DEFAULT NULL,
`duplicate_parent_id` Int (15) NULL DEFAULT NULL,
`attachment_id` Int (15) NULL DEFAULT NULL,
`attach_group_id` Int (15) NULL DEFAULT NULL,
Index `Card_ID` (` card_id`),
Index `Card_Task_id` (` `card_task_id`),
Index `attachment_id` (` attachment_id`),
Index `attach_group_id` (` attach_group_id`)
);
INSERT INTO COMPLITE_INCOMPLITE.
select tsk.card_task_id, tsk.card_id, tsk.tax_code,
STAT.TITLE AS REG_OPERATION,
TH.TITLE AS LIFE_SITUATION_NAME,
to_char (tsk.create_ts, 'yyyy-mm-dd hh24: mi: ss') as create_ts,
tsk.is_complete,
to_char (tsk.complete_ts, 'yyyy-mm-dd hh24: mi: ss') as Complete_TS,
ST .TASK_STEP_NAME AS CURRENT_STEP_ID,
tsk.prev_Tax_Code,
tsk.prev_STEP_TAX_Code,
NPT.TaxPayer_ID, NPT.Tax_Code AS Reg_Tax_Code, NPT.IN_NUMBER,
to_char (NPT.Receipt_Date, 'Yyyy-Mm-DD HH24: MI: SS') AS Receipt_Date
to_char (npt.registration_date, 'yyyy-mm-dd') as registration_date,
to_char (npt.control_date, 'yyyy-mm-dd') as control_date,
to_char (npt.final_date, 'yyyy-Mm-DD HH24: MI: SS') AS FINAL_DATE,
NPT.HAS_INTERIM_ANSWER,
to_char (npt.interim_answer_date, 'yyyy-mm-dd hh24: mi: ss') as interim_answer_date,
NPT.is_repeat,
NPT.Description, npt.duplicate_status, npt.duplicate_parent_id,
att.attachment_id, att.attach_group_id
from Card.t_Card_Task TSK.
join card.t_card_task_status stat on stat.card_task_status_id = tsk.card_task_status_id
join card.t_theme th o thheme_id = tsk.theme_id
Join Card.t_Task_STEP ST ON ST.TASK_STEP_ID = TSK.CURRENT_STEP_ID
join card.t_card npt on npt.card_id = tsk.card_id
Join Card.t_atTachment_Card_Link ATT on att.card_id = tsk.card_id;
SELECT * from Complite_inComplite C_I
Left Join Card.t_attachment Atta on atta.attachment_id on c_i.attachment_id;
DROP Table Complite_inComplite;
When executing an error:
ORA-00911: Invalid Character
I understand that it’s all about ;
. But how then to fulfill this request sequentially?
Request I can not run and give it to another person so that he performs it, but I do not have experience in Oracle.
Answer 1, Authority 100%
But how then to execute this request successively
Sequentially, if you do not have experience with this database, you need to start with a small warworthy example, consistently complicating it. Let’s start with the first line:
Create Global Temporary Table `TestTab` (Int (15) NULL DEFAULT NULL);
ORA-00911: Invalid Character
Correct:
create global temporary table testtab (ID INT);
Global Temporary Table Created.
and so on until it works.