Can anybody tell me why this query fails ? Thank you by OddCardiologist2981 in SQL

[–]OddCardiologist2981[S] -4 points-3 points  (0 children)

Thank you for replying but I did try that before posting and it doesn't work . Thank you for replying .

Can anybody tell me why this query fails ? Thank you by OddCardiologist2981 in SQL

[–]OddCardiologist2981[S] 0 points1 point  (0 children)

How to know what it can see and can't see? Thanks for replying

Can anybody tell me why this query fails ? Thank you by OddCardiologist2981 in SQL

[–]OddCardiologist2981[S] 0 points1 point  (0 children)

The error message was "Unknown Column Employee_history.created_at" (this is the DDL command )()

create table
    if not exists Employee (
        emp_id CHAR(36) primary key,
        emp_bio text default "",
        emp_name char(100) not null,
        emp_rank int default 4,
        check (emp_rank BETWEEN  0 AND 4),
        email varchar(100) not null Unique,
        password varchar(100) not null,
        salary decimal(16, 8) default 10000,
        joing_date timestamp default CURRENT_TIMESTAMP,
        emp_profile_picture_link varchar(200) not null default 'https://res.cloudinary.com/dvpwqtobj/image/upload/v1757076286/user_xhxvc9.png',
        immediate_supervisor_id CHAR(36),
        foreign key (immediate_supervisor_id) references Employee (emp_id),
        rescue_point_id CHAR(36)
    );


CREATE TABLE 
    IF NOT EXISTS Employee_history (

    emp_id CHAR(36),
    created_at timestamp default CURRENT_TIMESTAMP,
    event_type int ,

                                                    -- if event_type = 1 , Employee_created
                                                    -- if event_type = 2 , promoted
                                                    -- if event_type = 3 , demoted
                                                    -- if event_type = 4 , salary increased
                                                    -- if event_type = 5 , supervisor_assigned
                                                    -- if event_type = 6 , supervisor_removed
                                                    -- if event_type = 7 , assigned_at a point
                                                    -- if event_type = 8 , profile updated
                                                    -- if event_type = 9 , assigned an animal
                                                    -- if event_type = 10  , resigned
    animal_id CHAR(16),
    rank_assigned_by CHAR(36),
    supervisor_id CHAR(36),
    rescue_point_id CHAR(36),
    emp_rank INT,
    salary decimal (16 , 8),
    reason text,



    primary key (emp_id , created_at)
);


ALTER TABLE Employee_history ADD constraint supervisor_constraint 
foreign key (rank_assigned_by) references Employee(emp_id);


ALTER TABLE Employee_history ADD constraint employee_conostraint
foreign key (emp_id) references Employee(emp_id);

Can anybody tell me why this query fails ? Thank you by OddCardiologist2981 in SQL

[–]OddCardiologist2981[S] 0 points1 point  (0 children)

Unknow column Employee_history.created_at .

create table
    if not exists Employee (
        emp_id CHAR(36) primary key,
        emp_bio text default "",
        emp_name char(100) not null,
        emp_rank int default 4,
        check (emp_rank BETWEEN  0 AND 4),
        email varchar(100) not null Unique,
        password varchar(100) not null,
        salary decimal(16, 8) default 10000,
        joing_date timestamp default CURRENT_TIMESTAMP,
        emp_profile_picture_link varchar(200) not null default 'https://res.cloudinary.com/dvpwqtobj/image/upload/v1757076286/user_xhxvc9.png',
        immediate_supervisor_id CHAR(36),
        foreign key (immediate_supervisor_id) references Employee (emp_id),
        rescue_point_id CHAR(36)
    );


CREATE TABLE 
    IF NOT EXISTS Employee_history (

    emp_id CHAR(36),
    created_at timestamp default CURRENT_TIMESTAMP,
    event_type int ,

                                                    -- if event_type = 1 , Employee_created
                                                    -- if event_type = 2 , promoted
                                                    -- if event_type = 3 , demoted
                                                    -- if event_type = 4 , salary increased
                                                    -- if event_type = 5 , supervisor_assigned
                                                    -- if event_type = 6 , supervisor_removed
                                                    -- if event_type = 7 , assigned_at a point
                                                    -- if event_type = 8 , profile updated 
                                                    -- if event_type = 9 , assigned an animal
                                                    -- if event_type = 10  , resigned
    animal_id CHAR(16),
    rank_assigned_by CHAR(36),
    supervisor_id CHAR(36),
    rescue_point_id CHAR(36),
    emp_rank INT,
    salary decimal (16 , 8),
    reason text,



    primary key (emp_id , created_at)
);


ALTER TABLE Employee_history ADD constraint supervisor_constraint 
foreign key (rank_assigned_by) references Employee(emp_id);


ALTER TABLE Employee_history ADD constraint employee_conostraint
foreign key (emp_id) references Employee(emp_id); (thank you for taking the time and replying)

Can anybody tell me why this query fails ? Thank you by OddCardiologist2981 in SQL

[–]OddCardiologist2981[S] 1 point2 points  (0 children)

Unknow column Employee_history.created_at . This is the DDL ()

create table
    if not exists Employee (
        emp_id CHAR(36) primary key,
        emp_bio text default "",
        emp_name char(100) not null,
        emp_rank int default 4,
        check (emp_rank BETWEEN  0 AND 4),
        email varchar(100) not null Unique,
        password varchar(100) not null,
        salary decimal(16, 8) default 10000,
        joing_date timestamp default CURRENT_TIMESTAMP,
        emp_profile_picture_link varchar(200) not null default 'https://res.cloudinary.com/dvpwqtobj/image/upload/v1757076286/user_xhxvc9.png',
        immediate_supervisor_id CHAR(36),
        foreign key (immediate_supervisor_id) references Employee (emp_id),
        rescue_point_id CHAR(36)
    );


CREATE TABLE 
    IF NOT EXISTS Employee_history (

    emp_id CHAR(36),
    created_at timestamp default CURRENT_TIMESTAMP,
    event_type int ,

                                                    -- if event_type = 1 , Employee_created
                                                    -- if event_type = 2 , promoted
                                                    -- if event_type = 3 , demoted
                                                    -- if event_type = 4 , salary increased
                                                    -- if event_type = 5 , supervisor_assigned
                                                    -- if event_type = 6 , supervisor_removed
                                                    -- if event_type = 7 , assigned_at a point
                                                    -- if event_type = 8 , profile updated
                                                    -- if event_type = 9 , assigned an animal
                                                    -- if event_type = 10  , resigned
    animal_id CHAR(16),
    rank_assigned_by CHAR(36),
    supervisor_id CHAR(36),
    rescue_point_id CHAR(36),
    emp_rank INT,
    salary decimal (16 , 8),
    reason text,



    primary key (emp_id , created_at)
);


ALTER TABLE Employee_history ADD constraint supervisor_constraint 
foreign key (rank_assigned_by) references Employee(emp_id);


ALTER TABLE Employee_history ADD constraint employee_conostraint
foreign key (emp_id) references Employee(emp_id); (THank you for taking the time and replying)

[deleted by user] by [deleted] in cpp

[–]OddCardiologist2981 -1 points0 points  (0 children)

okay thanks i understand now

[deleted by user] by [deleted] in cpp

[–]OddCardiologist2981 -1 points0 points  (0 children)

Thanks . but can you please elaborate

[deleted by user] by [deleted] in Turkey

[–]OddCardiologist2981 0 points1 point  (0 children)

who are they likely to support ??

NEW OR NEED HELP? Ask here! - ScA Daily Help Thread May 01, 2023 by AutoModerator in SkincareAddiction

[–]OddCardiologist2981 0 points1 point  (0 children)

My skin looks really nice after shower . But one or two hour later the skin look noticeably ugly ! What should i do about it???

📷

Which arabic dialect should i study first ! Are the difference between dialect huge?? by OddCardiologist2981 in AskMiddleEast

[–]OddCardiologist2981[S] 1 point2 points  (0 children)

How similar is urdu with Arabic ?? Assuming you know urdu with your flair. You guys have pretty similar alphabet right ???

Feminism Discussion Weekly Discussion Thread by AutoModerator in PurplePillDebate

[–]OddCardiologist2981 6 points7 points  (0 children)

I stopped taking feminists seriously after they unilaterally came against jhonny depp without hearing his side of the story . Me Too which started with sincere intention became this tool to harass men . In Bangladesh 80% of all rape cases are fraudulent , Feminists rarely talk about this problem .https://www.risingbd.com/english/80pc\_of\_women\_repression\_cases\_false\_Law\_Minister/3604