bstar1019 02:21:13 | I am rather new at using MYSQl & am trying to construct query that displays a first & last name & the label of "opened by". Here's the query: SELECT a.account_id, a.cust_id, a.last_activity_date, a.open_emp_id, CONCAT(' Opened By ', e.fname, ' ', e.lname), a.avail_balance FROM account a INNER JOIN employee e ON a.open_emp_id = e. emp_id WHERE NOT EXISTS (SELECT 1 FROM transaction t WHERE t.txn_date = a.last_activity_date); It works great except that the column label is CONCAT(' Opened By ', e.fname, ' ', e.lname) instead of just e.fname & e.lname. Thanks in advance for your help. |
smo1234 02-23-2013 | Just check how concat is used. http://www.plus2net.com/sql_tutorial/concat.php |