What is the syntax for concatenating in cfquery with access db
-
24-10-2019 - |
Question
So, I've looked all over the web for this simple answer...and I can't find it.
I am trying to search an access DB via coldfusion query.
<cfquery name = "x" datasource = "cassupport_computers">
SELECT last, first, dept, location, purchasedate, (last + ' ' + first + ' ' + dept + ' ' + location + ' ' + purchasedate AS searchs)
FROM cas_computers
WHERE searchs like '%#form.searchfield#%'
</cfquery>
What am I doing wrong? x:
Solution
<cfquery name = "x" datasource = "cassupport_computers">
SELECT last, first, dept, location, purchasedate, last & ' ' & first & ' ' & dept & ' ' & location & ' ' & purchasedate AS searchs
FROM cas_computers
WHERE searchs like '%#form.searchfield#%'
</cfquery>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow