Question

2 errors SELECT Last_Name, NLV (TO_CHAR (Manager_Id), "No Manager") FROM EMP WHERE Manager_ID IS NULL;

2 errors

SELECT Last_Name, NLV (TO_CHAR (Manager_Id), "No Manager")

FROM EMP

WHERE Manager_ID IS NULL;

0 0
Add a comment Improve this question Transcribed image text
Answer #1

SELECT Last_Name, NVL (TO_CHAR (Manager_Id), "No Manager")

FROM EMP;

Errors:

1. NLV should be replaced with NVL.

2. The WHERE clause Manager_ID IS NULL is not required since NVL function takes care of it.

Add a comment
Know the answer?
Add Answer to:
2 errors SELECT Last_Name, NLV (TO_CHAR (Manager_Id), "No Manager") FROM EMP WHERE Manager_ID IS NULL;
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Express the following SQL command in English: SELECT last_name, first_name                 FROM students             &

    Express the following SQL command in English: SELECT last_name, first_name                 FROM students                 WHERE first_name LIKE 'D%' OR last_name LIKE '%n';

  • What is wrong with the following SQL statement? select first_name , last_name , phone from Customer,...

    What is wrong with the following SQL statement? select first_name , last_name , phone from Customer, Orders where customer.customerid = orders.customerid; Group of answer choices 1 You cannot join customer.customerid to orders.cutomerid 2 Nothing is wrong with this statement. 3 The join is wrong. You can only join tables in the FROM clause. 4 The result will be a Cartesian Product.

  • How would I write the SQL statement SELECT fname AS First_Name, lname AS Last_Name FROM employee...

    How would I write the SQL statement SELECT fname AS First_Name, lname AS Last_Name FROM employee WHERE salary BETWEEN 10000 AND 30000; in relational algebraic syntax?

  • emp table in bellow: 5. Query data from emp table for each non-deptno 20 employees to...

    emp table in bellow: 5. Query data from emp table for each non-deptno 20 employees to display the ename and calculate the number of months between today and the date the employee was hired. Label the column heading to Ename and Months_Worked. Order your results by the number of months employed. Round the number of months to a whole number. Months _Worked - - - - - - - - Ename MILLER KING JAMES MARTIN TURNER CLARK BLAKE WARD ALLEN...

  • what is wrong with this database says inner is not a table SELECT last_name, first_name, job_title,...

    what is wrong with this database says inner is not a table SELECT last_name, first_name, job_title, salary, min_salary, max_salary, city, state_province, country_name FROM employees INNER JOIN jobs ON employees.job_id = jobs.job_id, INNER JOIN departments dep ON employees.department_id = dep.department_id INNER JOIN locations ON dep.locations_id = locations.location_id INNER JOIN countries ON locations.country_id = countries.country_id WHERE dep.location_id = 1700 ORDER BY salary DESC;

  • -- echo Building demo tables. Please wait. DROP TABLE EMP CASCADE CONSTRAINTS; DROP TABLE DEPT; DROP...

    -- echo Building demo tables. Please wait. DROP TABLE EMP CASCADE CONSTRAINTS; DROP TABLE DEPT; DROP TABLE SALGRADE; DROP TABLE Prod CASCADE CONSTRAINTS; DROP TABLE Vend; CREATE TABLE DEPT ( DEPTNO NUMBER(2) NOT NULL, DNAME CHAR(14), LOC CHAR(13), CONSTRAINT DEPT_PRIMARY_KEY PRIMARY KEY (DEPTNO)); INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK'); INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS'); INSERT INTO DEPT VALUES (30,'SALES','CHICAGO'); INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON'); CREATE TABLE EMP ( EMPNO NUMBER(4) NOT NULL, ENAME CHAR(10), JOB CHAR(9), MGR NUMBER(4) CONSTRAINT EMP_SELF_KEY...

  • CREATE TABLE DEPT ( DEPTNO INTEGER NOT NULL, DNAME VARCHAR(14), LOC VARCHAR(13), PRIMARY KEY (DEPTNO)); INSERT...

    CREATE TABLE DEPT ( DEPTNO INTEGER NOT NULL, DNAME VARCHAR(14), LOC VARCHAR(13), PRIMARY KEY (DEPTNO)); INSERT INTO DEPT VALUES (10,'SPORTS','NEW YORK'); INSERT INTO DEPT VALUES (20,'HOME','DALLAS'); INSERT INTO DEPT VALUES (30,'OUTDOOR','CHICAGO'); INSERT INTO DEPT VALUES (40,'CLOTHING','BOSTON'); CREATE TABLE EMP ( EMPNO INTEGER NOT NULL, ENAME VARCHAR(10), JOB VARCHAR(9), MGR INTEGER, SAL FLOAT, COMM FLOAT, DEPTNO INTEGER NOT NULL, FOREIGN KEY (DEPTNO) REFERENCES DEPT (DEPTNO), FOREIGN KEY (MGR) REFERENCES EMP(EMPNO), PRIMARY KEY (EMPNO)); INSERT INTO EMP VALUES (7839,'KING','PRESIDENT',NULL, 5000,NULL,10); INSERT INTO...

  • DROP TABLE EMPLOYEE; DROP TABLE JOB; DROP TABLE EMP; DROP TABLE EMP_1; DROP TABLE EMP_2; CREATE...

    DROP TABLE EMPLOYEE; DROP TABLE JOB; DROP TABLE EMP; DROP TABLE EMP_1; DROP TABLE EMP_2; CREATE TABLE JOB(JOB_CODE CHAR (3) PRIMARY KEY, JOB_DESCRIPTION VARCHAR (20) NOT NULL,JOB_CHG_HOUR NUMBER (5,2) NOT NULL,JOB_LAST_UPDATE DATE NOT NULL); INSERT INTO JOB VALUES('500','Programmer','35.75','20-Nov-2017'); INSERT INTO JOB VALUES('501','System Analyst','96.75','20-Nov-2017'); INSERT INTO JOB VALUES('502','Database Designer','125.00','24-Mar-2018'); CREATE TABLE EMPLOYEE(EMP_NUM CHAR (3) PRIMARY KEY,EMP_LNAME VARCHAR (15) NOT NULL,EMP_FNAME VARCHAR (15) NOT NULL, EMP_INITIAL CHAR (1),EMP_HIREDATE DATE NOT NULL,JOB_CODE CHAR (3), EMP_YEARS NUMBER (2),FOREIGN KEY (JOB_CODE) REFERENCES JOB (JOB_CODE)); INSERT...

  • How many rows in the following SELECT statement will return a null prerequisite? SELECT prerequisite, COUNT(*)...

    How many rows in the following SELECT statement will return a null prerequisite? SELECT prerequisite, COUNT(*) FROM course WHERE prerequisite IS NULL GROUP BY  prerequisite; None One Multiple

  • Identify possible errors in the following sql code (this is one code): line 1. SELECT orderID,...

    Identify possible errors in the following sql code (this is one code): line 1. SELECT orderID, customerID, customerLname, orderDate line 2. FROM [order] O, customer C line3. WHERE cutomerID IN line4. (SELECT customerID FROM C line5. WHERE customerstate = ("CA","AZ")); plus find the important missing mistake

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT