View the step-by-step solution to:

This question was created from SQL-HW-Exercises-SQL-Server-F-16

This question was created from SQL-HW-Exercises-SQL-Server-F-16 https://www.coursehero.com/file/20708947/SQL-HW-Exercises-SQL-Server-F-16/

20708947-216518.jpeg

for question 3 or #49 on the document. a SELECT statement that returns these colums from the Orders table: A column that uses the CONVERT function to return the OrderDate column in this format: MM/DD/YYYY. In other words, use two-digit months, days, and years and separate each date component with slashes A column that uses the CONVERT function to return the OrderDate column with the date, and the hours and minutes on a 12-hour clock with an am/pm indicator A column that uses the CONVERT function to return the OrderDate column with 2-digit hours, minutes, and seconds on a 24-hour clock. Use leading zeros for all date/time components.

20708947-216518.jpeg

Top Answer

(a)Return a column that convert the orderdate in format of mm/dd/yyyy with all leading zeroes. SELECT  ... View the full answer

5 comments
  • SELECT CONVERT(varchar, OrderDate,101) AS OrderDate, CONVERT(varchar, OrderDate) AS OrderDate2, CONVERT(varchar, OrderDate,8) AS OrderDate3 FROM Orders; this was the original answer that a tutor posted but it comes up incorrect, i tried yours and it saids ORA-00923: FROM keyword not found where expected
    • joshgroden
    • Oct 03, 2018 at 5:24pm
  • This error generally comes when From is not written in its correct form. Use semicolon at the end and check if you are using from correctly.
    • raksha_nawal
    • Oct 03, 2018 at 5:32pm
  • no, i tired changing the FROM products to different tables and used semicolon, didnt work
    • joshgroden
    • Oct 03, 2018 at 5:39pm
  • Provide your database so that I can work on the same.
    • raksha_nawal
    • Oct 03, 2018 at 5:41pm
  • guitarshop
    • joshgroden
    • Oct 03, 2018 at 5:42pm

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online