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

  • SEARCH
  • Home
  • 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 4031978
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:39:51+00:00 2026-05-20T11:39:51+00:00

If I have a column that is Address1 and Address2 in my database, how

  • 0

If I have a column that is Address1 and Address2 in my database, how do I combine those columns so that I could perform operations on it only in my select statement, I will still leave them separate in the database. I would like to be able to do this

WHERE completeaddress LIKE '%searchstring%'

Where completedaddress is the combination of Address1 and Address2. searchstring would be like the data they searched for. So if they had ‘123 Center St’ in Address1 and ‘Apt 3B’ in Address2, how would I have it select it if the searchstring was ‘Center St 3B’ Is this possible with SQL?

  • 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-20T11:39:52+00:00Added an answer on May 20, 2026 at 11:39 am

    I think this is what you are looking for –

    select Address1+Address2 as CompleteAddress from YourTable
    where Address1+Address2 like '%YourSearchString%'
    

    To prevent a compound word being created when we append address1 with address2, you can use this –

    select Address1 + ' ' + Address2 as CompleteAddress from YourTable 
    where Address1 + ' ' + Address2 like '%YourSearchString%'
    

    So, ‘123 Center St’ and ‘Apt 3B’ will not be ‘123 Center StApt 3B’ but will be ‘123 Center St Apt 3B’.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that has 5 columns: AcctId (int), Address1 (varchar), Address2 (varchar),
I have a text column that should only have 1 of 3 possible strings.
I have a database column that contains the contents of a file. I'm converting
I have a XML column in database that may look like that ones: <sql-connection-info
In my SQL 2008 database table, I have one column name AUTHOR that contains
Currently I have an address column that is an embedded document in my users
I have a column that has the following data: PersonId=315618 LetterId=43 MailingGroupId=1 EntityId=551723 trackedObjectId=9538
I have a column that contains links. The problem is that the titles of
I have a column that I need to be able to guarantee never gets
I have a varchar column that has data like this top<somenumber> so the word

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.