House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

How do you concatanate two table fields in CFQUERY with MS Access

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

How do you concatanate two table fields in CFQUERY with MS Access

tblJobSeekers.pverify,tblJobSeekers.jsphone1 Sandy Clark 05/15/2004 09:57 AM
Try atfname || ' ' || atlname AgentName Jim Louis 05/14/2004 10:23 PM
Sql uses +   Sandy Clark 05/14/2004 10:21 PM
Hey all, Angel Stewart 05/14/2004 09:42 PM

05/15/2004 09:57 AM
Author: Sandy Clark Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32529#163297 tblJobSeekers.pverify,tblJobSeekers.jsphone1 [atfname] + " " + [atlname] AS AgentName Looks like you are missing a comma after .jsphone]   _____ Sent: Saturday, May 15, 2004 6:15 AM To: CF-Talk Subject: FW: How do you concatanate two table fields in CFQUERY with MS Access Well Sandy...I tried that initially but it just didn't work. So I thought I was doing something totally wrong and that Access SQL uses something beside the +. But! Good news! I tried that code in an SQL Statement with nothing else but Select atfname + ' ' + atlname AS Agentname FROM tblagent And it worked fine. So there must be something else in the syntax of SELECT tblusers.username, tblJobSeekers.jsfname, tblJobSeekers.jslname,tblJobSeekers.jsemail, tblJobSeekers.jscountry, tblJobSeekers.pverify,tblJobSeekers.jsphone1 [atfname] + " " + [atlname] AS AgentName FROM tblAgent INNER JOIN (tblusers INNER JOIN tblJobSeekers ON tblusers.userid = tblJobSeekers.userid) ON tblAgent.atid = tblJobSeekers.agentid ORDER BY tblJobSeekers.jslname; That's causing it to fail. *sigh* I hate syntax errors. And I don't understand why the MSACcess SQL string failed to work. Could someone explain that? Thanks for the help :) -Gel Access From: "Sandy Clark" Date: Fri, 14 May 2004 22:18:07 -0400 Thread: http://www.houseoffusion.com/cf_lists/index.cfm/method=messages&threadid =32529&forumid=4#163293 Sql uses +   & is the CF concatenation. Silly gel.   _____   _____  
05/14/2004 10:23 PM
Author: Jim Louis Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32529#163294 Try atfname || ' ' || atlname AgentName I got that from my teaching yourself sql in 21 days book p 54. Jim Louis Best Meetings Inc. >Hey all, ----- Excess quoted text cut - see Original Post for more -----
05/14/2004 10:21 PM
Author: Sandy Clark Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32529#163293 Sql uses +   & is the CF concatenation. Silly gel.   _____ Sent: Friday, May 14, 2004 9:40 PM To: CF-Talk Subject: How do you concatanate two table fields in CFQUERY with MS Access Hey all, I need some help with MSAccess SQL statements. This code throws the error: Too Few Parameters SELECT tblusers.username, tblJobSeekers.jsfname, tblJobSeekers.jslname, tblJobSeekers.jsemail, tblJobSeekers.jscountry, tblJobSeekers.pverify, tblJobSeekers.jsphone1, [atfname] & " " & [atlname] AS AgentName FROM tblAgent INNER JOIN (tblusers INNER JOIN tblJobSeekers ON tblusers.userid = tblJobSeekers.userid) ON tblAgent.atid = tblJobSeekers.agentid ORDER BY tblJobSeekers.jslname; >From this you can see that I want to concatenate the atfname and atlname fields into one field and call it Agent Name. There's a reason I need to have one column with this value rather than do it later when I'm displaying the data, its for use with a custom tag. Can anyone suggest why I'm getting this error, and what should be the correct syntax? This particular query works perfectly from within MS Access itself. -Gel   _____  
05/14/2004 09:42 PM
Author: Angel Stewart Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32529#163292 Hey all, I need some help with MSAccess SQL statements. This code throws the error: Too Few Parameters SELECT tblusers.username, tblJobSeekers.jsfname, tblJobSeekers.jslname, tblJobSeekers.jsemail, tblJobSeekers.jscountry, tblJobSeekers.pverify, tblJobSeekers.jsphone1, [atfname] & " " & [atlname] AS AgentName FROM tblAgent INNER JOIN (tblusers INNER JOIN tblJobSeekers ON tblusers.userid = tblJobSeekers.userid) ON tblAgent.atid = tblJobSeekers.agentid ORDER BY tblJobSeekers.jslname; >From this you can see that I want to concatenate the atfname and atlname fields into one field and call it Agent Name. There's a reason I need to have one column with this value rather than do it later when I'm displaying the data, its for use with a custom tag. Can anyone suggest why I'm getting this error, and what should be the correct syntax? This particular query works perfectly from within MS Access itself. -Gel
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference