Hi
How can I choose a field based on another fields value in SQL? In MySQL I would use CONCAT - but it only works in SQL Server 2012 - as far as I can see.
I'm trying to do the following from the AccessUser table:
SELECT Firm.*, Empl.* FROM AccessUser Firm, AccessUser Empl WHERE Firm.AccessUserParentID = '261' AND Empl.AccessUserGroups LIKE ('%' + Firm.AccessUserID + '%')
In my search for an solution, I've found out that I could use '+' (plusses) instead of CONCAT - But all i get is "Incorrect syntax near 'Firm'" - which relates to the 'LIKE' section of the SQL. I have tried to strip the parenthethis, the spaces etc. but nothing seems to work.
Is it not possible to do such query?! Can someone help?