Skip to main content
Participant
April 23, 2008
Answered

SQL Concatenation

  • April 23, 2008
  • 1 reply
  • 509 views
Hi,

Can anyone help me with this no doubt simple query.

SELECT Authors.authorID, Authors.lastname, Authors.firstname, [firstname] & " " & [lastname] AS fullname,
FROM Authors
WHERE [firstname] & " " & [lastname] LIKE '%#indexsearch#%'

at the moment all i get is

Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1

Any help would be most welcome :-)

Thanks

Craig.
This topic has been closed for replies.
Correct answer Ginga2050
Thanks that works a treat

[firstname] + ' ' + [lastname]

1 reply

Inspiring
April 24, 2008
I do not remember the correct syntax offhand, but try using + for the concatenation operator instead of & and use single quotes instead of double quotes

[firstname] + " " + [lastname]
Ginga2050AuthorCorrect answer
Participant
April 24, 2008
Thanks that works a treat

[firstname] + ' ' + [lastname]