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 8415603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:29:26+00:00 2026-06-10T01:29:26+00:00

How to add multiple column’s data into a single column in SQL Server? I

  • 0

How to add multiple column’s data into a single column in SQL Server?

I have columns like Loc_BldgStreet, Loc_Area, Loc_City, Loc_State, Loc_Country and I want to add them all into one single column (in view) to show them in gridview (asp.net) as in single column as full address to avoid very wide grid.

How to do it? I am using linq for binding grid from the location_view.

Thank you!

  • 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-06-10T01:29:28+00:00Added an answer on June 10, 2026 at 1:29 am

    The + sign is what you use to concatinate strings in SQL.

    col1 + col2 as Colname
    

    If one of the columns happens to be numeric (i.e. int) then use convert or cast

    col1 + convert(varchar(10), col2) as Colname
    

    If one of the columns allows null, you’ll need to use IsNull otherwise, the entire string will return null:

    col1 + isnull(col2, '') as Colname
    

    To create a view:

    CREATE VIEW dbo.MyView
    AS
    
    SELECT col1, col2, col3 + col4 + col5 as NewColName
    FROM dbo.MyTable
    GO
    

    You can also create a computed column and place your concatination there. Computed columns can also use functions for things like running totals and such and do not require the extra view.

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

Sidebar

Related Questions

I am trying to add my data into multiple columns ListBox, I did it
I have multiple files with data written in two column looks like: asp 1.88
I'm trying to add multiple jQuery data entries to a single element. I suspected
I have a gridview ...with multiple columns. If I click on one column, it
How to add running total in crystal reports having multiple columns? e.g I have
In Derby DB, is it possible to add multiple columns using single query? The
I need to calculate and add to a data frame multiple new columns based
Is it possible to alter table add MULTIPLE columns in a single statement in
I'm using C++ and ADO to add data to a SQL Server 2005 database.
I have got a UIPickerView with multiple components/columns. I want the UIPickerView to add

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.