Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6469901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:02:50+00:00 2026-05-25T06:02:50+00:00

Trying to use SQL Server with a jQuery autocomplete. I can get the following

  • 0

Trying to use SQL Server with a jQuery autocomplete. I can get the following to work when just checking the term entered with a matching domain, but I would also like the autocomplete to check if a match is found for the contact name (first name and last name).

Is there a way (like in mySQL) to concat the fname and lname?

Domain only:

($term = data entered in autocomplete box)

SELECT distinct comp_companyid, comp_name, comp_emailaddress, comp_website, pers_firstname, pers_lastname, addr_address1, addr_address2, addr_city, addr_state, addr_postcode
FROM company, person, address, address_link
WHERE pers_companyid = comp_companyid
  AND addr_addressid = adli_addressid
  AND adli_companyid = comp_companyid
  AND comp_website LIKE '%".$term."%';

My attempt at matching name as well:

SELECT distinct comp_companyid, comp_name, comp_emailaddress, comp_website, pers_firstname, pers_lastname, addr_address1, addr_address2, addr_city, addr_state, addr_postcode
FROM company, person, address, address_link
WHERE pers_companyid = comp_companyid
  AND addr_addressid = adli_addressid
  AND adli_companyid = comp_companyid
  AND comp_website LIKE '%".$term."%'
  OR pers_firstname + ' ' + pers_lastname LIKE '%".$term."%';
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:02:51+00:00Added an answer on May 25, 2026 at 6:02 am

    Figured it out:

    SELECT * FROM <TABLES> WHERE (website LIKE '%".$term."%' OR (firstname +' '+ lastname) LIKE '%".$term."%';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get this awesome JQuery plugin working with SQL Server. I
I am using Microsoft SQL Server I am trying to use the following sql
I'm trying to use SQL Server 2000 DTS Package to download a file from
I'm trying to learn advanced sql and how to use system queries (sql server).
I'm trying to use SQL Server Integration Services (SSIS) to parse an XML file
I am trying to use SQL Server Compact Edition 3.5 as a database backend
I'm trying to use SQL Server Profiler (2005) to track down some application performance
I'm running NHibernate and SQL Server CE I am trying to use GUIDs as
I'm trying to use a SQL Server stored procedure with ASP: ALTER PROCEDURE [dbo].[user_insert]
I am trying to use the MS SQL Server 2005 Import/Export tool to export

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.