#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    1
    Rep Power
    0

    Need Help With Cases


    I'm a complete noob to MySQL and I'm hung up on the following 2 parts of my assignment for class:

    -Show the first (first_name) and last (last_name) names for everyone in the customer_contacts table for everyone whose first name includes a capital 'A' but not a lower case 'a'.

    -For some strange reason the boss orders you to display the last names of everyone in the customer_contacts table with the last name (last_name) in the form XtheRestOfTheNameX, where the Xs represent a capitalized first letter and last letter of the last name. For example, 'Einsten' would be displayed as 'EinsteiN'.

    Can someone please point me in the right direction with these?
    Thanks!
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,209
    Rep Power
    4279
    Originally Posted by FionaCat86
    Can someone please point me in the right direction with these?
    Code:
    SELECT expression1
         , expression2
         , expressionN
      FROM customer_contacts 
     WHERE condition(s)
    the expressions required will involve either columns (like first_name, last_name) or functions operating on columns (like SUBSTRING and UPPER)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

IMN logo majestic logo threadwatch logo seochat tools logo