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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:09:35+00:00 2026-05-17T17:09:35+00:00

I have the following DB Schema :- Data is … Location Table 1. New

  • 0

I have the following DB Schema :-

alt text

Data is …

Location Table
1. New York
2. London
3. Tokyo
4. Melbourne

OtherNames Table (aka Aliases)

1. NYC
1. New York City
4. Home
3. Foo
3. PewPew

What I’m trying to do, as SQL, is get the following results :-

ID, Name, Name + Aliases

eg.

1 | New York | new york nyc new york city
2 | London | NULL
3 | Tokyo | tokyo foo pewpew
4 | Melbourne | melbourne home

I’m not sure how to get that LAST column.

It’s like I want to have a SubQuery which COALESCE‘s the OtherName.Name field, per Location row… ?

It’s related to a previous question I have .. but my previous question doesn’t give me the proper results I was after (I didn’t ask the right question, before :P)

NOTE: I’m after a TSQL / Non server specific answer. So please don’t suggest GROUP_CONCAT();

  • 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-17T17:09:36+00:00Added an answer on May 17, 2026 at 5:09 pm

    SQL isn’t suited to this kind of operation (1NF violation and all that), therefore the various workarounds in SQL will be vendor-specific. If you want something vendor-independent then use something that will consume vanilla SQL (rather than generate it) e.g. a report writer or 3GL application 😉

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

Sidebar

Related Questions

In a table I have the following schema table1: playerID int primary key, nationalities
I have the following table schema; CREATE TABLE `db1`.`sms_queue` ( `Id` INTEGER UNSIGNED NOT
I have the following schema: TABLE bands -> band_id -> property1 -> property2 ->
I have the following schema: Database: test. Table: per_login_user, Field: username (PK), password Database:
I have the following table schema: create table SerialNo2( IncarnationID_UID counter primary key, Mark
I want to do the following: facebook.Schema.stream_data data = api.stream.get(null, new List<string> { page_id
I have two tables with the following schema: CREATE TABLE sales_data ( sales_time date
I have a PostgreSQL table with the following schema - CREATE TABLE test (
Suppose I have the following schema: Table: Showing showing_id movie_id theater_id show_date show_time Table:
I have a SQL table with the following schema: fruit_id INT price FLOAT date

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.