Advertisement
JimboLP

DB Basics - May 2018

Jun 1st, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.27 KB | None | 0 0
  1. --Build-in Functions
  2. --11. Mix of Peak and River Names
  3. select p.PeakName,
  4.         r.RiverName,
  5.         concat(lower(p.PeakName), lower(r.RiverName)) as Mix
  6. from Peaks p
  7.     inner join Rivers r on
  8.         (substring(r.RiverName, 1,1) = substring(p.PeakName, len(p.PeakName), 1))
  9. order by Mix
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement