Exercise

CONVERTing data

Another important function similar to CAST() is CONVERT(). They are very similar in functionality, with the exception that with CONVERT() you can use a style parameter for changing the aspect of a date. Also, CONVERT() is SQL Server specific, so its performance is slightly better than CAST(). Nonetheless, it's important to know how to use both of them.

In this exercise, you are going to enhance your knowledge of the CONVERT() function.

Instructions 1/3

undefined XP
  • 1

    Retrieve the birth date from voters, in this format: Mon dd,yyyy.

  • 2

    Select the company, bean origin and the rating from the ratings table. The rating should be converted to a whole number.

  • 3

    Select the company, bean origin and the rating from the ratings table where the whole part of the rating equals 3.