Question

Answer the following question in SQL: 6. Display employees’ LastName, FirstName and only the year value...

Answer the following question in SQL: 6. Display employees’ LastName, FirstName and only the year value from each employee’s hire date SQL File: https://pastebin.com/tR98LUb3 Expert Answer

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

The Below is the sql query for the given requirement:

select lname||'='||fname||'='||to_char(HIREDATE,'YYYY') from employee;

Here to_char function is used to get the year of the hire date in the specified YYYY (year) format.

Please find the below output :

Add a comment
Know the answer?
Add Answer to:
Answer the following question in SQL: 6. Display employees’ LastName, FirstName and only the year value...
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
  • j. Create a SQL query based on tblTransaction and tblEmployees that will display all the fields...

    j. Create a SQL query based on tblTransaction and tblEmployees that will display all the fields from tblTransaction and the FirstName and LastName fields from tblEmployees. Use a join to include all employees, regardless if they have sold any products. Sort in ascending order by the employee’s first name and last name. Save your query as qryEmpTransaction_initialLastname, and then close the query. Feilds from tbl Transaction are TransactionID, CustomerID, EMployeeID, TransactionDate, MethodOfPayment Feilds from tbl Employees are EmployeeID, FirstName, LastName,...

  • Use the N2 Corporation database tables to design the following subqueries: a) Display all employees’ ID,...

    Use the N2 Corporation database tables to design the following subqueries: a) Display all employees’ ID, names (Fname Lname format) and their department name who has the same department as Jinku Shaw’s department name. SQL File: https://pastebin.com/tR98LUb3

  • ​​​​​​​ SQL Display the employee names in this format: Lastname(in upper case)<comma>First_name(in initcaps) from employees using...

    ​​​​​​​ SQL Display the employee names in this format: Lastname(in upper case)<comma>First_name(in initcaps) from employees using NESTED FUNCTIONSName the column as ‘Formatted Name’                         Eg: STEVEN,Fox

  • Here is my SQL statement that I am trying to run in order to pull employees...

    Here is my SQL statement that I am trying to run in order to pull employees who were born in 1963, however I'm stumped on how to get it to be ran as ONLY the year 1963, any help would be awesome. SELECT   FirstName, LastName, BirthDate FROM   Employees GROUP BY BirthDate, FirstName, LastName;

  • Given the following relational tables TEACHER (TeacherID. FirstName LastName Department) COURSE Course CourseName Year, Semester, Main...

    Given the following relational tables TEACHER (TeacherID. FirstName LastName Department) COURSE Course CourseName Year, Semester, Main Teacherib. Language) STUDENT (StudentIDFirstName, LastName. BirthDate, Nationality) STUDENT COURSE-ENROLLMENT (Coursel. Studenti, EnrollmentYear) STREAMING-VIDEOLECTURE VideolecturelD Coursel. Topic Date, DurationInMinutes. Teacher) STREAMING-VIDEOLECTURE-ATTENDANCE (Studenti Videolecture. Coursel. AttendanceInMinutes) Write the following query in SQL language: Select the student 1o. first name, last name and nationalty of each student who has never attended a streaming video-lecture longer than 10% of the video-lecture duration Assignment for the exercise Use the...

  • Given the following table structure, write the SQL code to display all the first and last...

    Given the following table structure, write the SQL code to display all the first and last names of the individuals that have a last name that begins with the letter 'M! CREATE TABLE Persons Personi int LastName varchar(80). FirstName varchar(80). Address varchar(125). State char(2) Given the following table structure, write the SQL code to display all the first and last names of the individuals that have a last name that does not contain the letter 'S: CREATE TABLE Persons PersonlDint,...

  • answer in c# console application. File l/O Create a Person class (firstName, lastName, phoneNumber, gender (Use...

    answer in c# console application. File l/O Create a Person class (firstName, lastName, phoneNumber, gender (Use radioButtons for gender in the GUI) ) Create a List<Person> Create a GUI that will collect the Person information from the user and have 3 buttons: Add, Display, Read. Add button Add the just created person to List<Person>, and append to a text file Display button > print out all persons currently in the List<Person> in a label in a visually attractive way Read...

  • QUESTION B1. (7 marks) This question assumes the following relational schema Employee (employeeNumber, lastName, firstName, DOB,...

    QUESTION B1. (7 marks) This question assumes the following relational schema Employee (employeeNumber, lastName, firstName, DOB, HireDate, Position Salary, Dept) Primary Key: employeeNumber Foreign key: Dept refers to DeptID in Department Department (DeptID, DeptName, DeptLocation) Primary Key: DeptID You have been given the following MySQL stored procedure: CREATE PROCEDURE Find_EmployeeName (IN employeeNo INT (11), OUT employeeName VARCHAR (60)) BEGIN SELECT concat(firstName, '', lastName) INTO employeeName FROM employees WHERE employeeNumber employeeNo; END (a) (2 marks) Name the two types of parameters...

  • SQL query: Write an SQL query that will output the last name, employee id, hire date and department from the employee table. Pick only those employees whose department ID is specified in the employee...

    SQL query: Write an SQL query that will output the last name, employee id, hire date and department from the employee table. Pick only those employees whose department ID is specified in the employee table. If the employee id is 777, name is ABC and hire date is 01-JAN-2016, the output should look as follows - 'Stephen (Employee ID - 777) was hired on the 1st of January, 2016 – Department: 90'. Note - The date should not have preceding...

  • Lastname, Firstname MECH 1314 Homework #12-Bisection Due: 4/22/2019 Instructions: Submit your scr...

    Lastname, Firstname MECH 1314 Homework #12-Bisection Due: 4/22/2019 Instructions: Submit your script in a file named hwk12.m to the dropbox before 11:59 pm on the due date 20 pts The "root" of an equation, y f(x), is a value of x for which y has a value of zero and it is often "the answer" for a practical engineering problem. For example, ion Algebra you learned the Quadratic Equation, an equation that allows you to compute the value of each...

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