U0100047: Enter the data type based on the actual scenario of the source statement
Description
GaussDB Distributed does not support generated columns.
Database Type and Version
- Source database type and version: Oracle versions supported by UGO
- Target database type and version: GaussDB Distributed versions supported by UGO
Syntax Example
Oracle script:
CREATE TABLE test_con (
createtime TIMESTAMP(3),
createdate as (TO_CHAR(createtime, 'YYYYMMDD'))
);
Suggestion
1. Change the table with generated columns to a common table and the data type to TEXT.
2. Use a trigger to simulate generated columns.
Script compatible with GaussDB:
CREATE TABLE test_con (
createtime TIMESTAMP(3),
createdate text
);
CREATE OR REPLACE FUNCTION dsc_fn_generated_test_con()
RETURN trigger
AS
BEGIN
NEW.createdate = (NEW.createtime, 'YYYYMMDD');
RETURN NEW;
END;
/
CREATE TRIGGER dsc_tr_generated_test_con
BEFORE INSERT OR UPDATE
ON test_con
FOR EACH ROW
EXECUTE PROCEDURE dsc_fn_generated_test_con();
/
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot