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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:47:43+00:00 2026-05-26T11:47:43+00:00

Not sure how to describe this so I will show example: table PAGES id

  • 0

Not sure how to describe this so I will show example:

table PAGES

id      int
parent  int
name    nvarchar
status  tinyint

table PAGES_MODULES

id          int 
id_parent   int
module_type nvarchar
module_id   int
status      int

One page can have more than one linked modules. Example records:

id    parent    name     status
1     -1        Xyz      1
2     -1        Yqw      1

id    id_parent    module_type    module_id     status
1     1            ARTICLE        1             1
2     1            GALLERY        2             1
3     2            CATEGORY       3             1

What I need is to create select which will not return 2 results if I do select left join page_modules.

I would like to have select which returns linked modules as this:

id    parent    name     status    modules
1     -1        Xyz      1         ARTICLE GALLERY
2     -1        Yqw      1         CATEGORY

Is that possible?

Thanks.

UPDATE

I have tried COALESE, CROSS APPLY and SELECT within SELECT methods and came to these conclusions:

http://blog.feronovak.com/2011/10/multiple-values-in-one-column-aka.html

Hope I can publish these here, not meaning to spam or something.

  • 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-26T11:47:44+00:00Added an answer on May 26, 2026 at 11:47 am

    You’d need to create a custom aggregate function that could concatenate the strings together, there is no built-in SQL Server function that does this.

    You can create a custom aggregate function (assuming your using the latest version of SQL) using a .Net assembly. Here’s the MS reference on how to do this (the example in the article is actually for a CONCATENATE function just like you require): http://msdn.microsoft.com/en-us/library/ms182741.aspx

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

Sidebar

Related Questions

I'm not sure how to describe this problem, so I think an example is
Hmm.. I am not sure how to describe this. But I will try So
I'm not sure how to describe this but I'm trying to create a base
I'm not sure how else to describe this, outside of calling it a newspaper
Not sure if the subject was clear, hard to describe, easy to show: I
I'm not sure exactly how to describe this question, but here goes. I've got
I'm not sure how to describe this, but I'll try with some basic code:
I'm not sure how best to describe this, or the best title, so bear
I'm sorry about the title I'm just not sure how to describe this one.
I'm not quite sure how to describe this in words without making it overly

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.