| Author |
apply query after concate two column
|
deep raj
Ranch Hand
Joined: Dec 11, 2009
Posts: 186
|
|
how can we apply query on column combined with two columns
i use it
SELECT CONCAT(emp_fname,' ',emp_lname) AS emp_name
FROM employee_personal
where emp_name NOT IN (select emp_name from task_allocation where proj_name='abc')
but it shows error on "where emp_name NOT IN
|
 |
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
Sir this isn't a JSP question...
[moderator removed the dude word]
|
 |
Ireneusz Kordal
Ranch Hand
Joined: Jun 21, 2008
Posts: 423
|
|
A column alias definied in the SELECT clause of the query can be only used in the ORDER BY clause of this query,
it cannot be used in any other clauses.
This should work:
|
 |
Tom Reilly
Rancher
Joined: Jun 01, 2010
Posts: 618
|
|
Don't you also need to add the CONCAT to the subselect?
|
 |
deep raj
Ranch Hand
Joined: Dec 11, 2009
Posts: 186
|
|
|
Thank you Ireneusz Kordal and Tom Reilly
|
 |
 |
|
|
subject: apply query after concate two column
|
|
|