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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:10:34+00:00 2026-05-10T21:10:34+00:00

I put together a sample scenario of my issue and I hope its enough

  • 0

I put together a sample scenario of my issue and I hope its enough for someone to point me in the right direction.

I have two tables

Products

alt text

Product Meta

alt text

I need a result set of the following

alt text

  • 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. 2026-05-10T21:10:34+00:00Added an answer on May 10, 2026 at 9:10 pm

    We’ve successfully used the following approach in the past…

    SELECT [p].ProductID,        [p].Name,        MAX(CASE [m].MetaKey              WHEN 'A'                THEN [m].MetaValue            END) AS A,        MAX(CASE [m].MetaKey              WHEN 'B'                THEN [m].MetaValue            END) AS B,        MAX(CASE [m].MetaKey              WHEN 'C'                THEN [m].MetaValue            END) AS C FROM   Products [p]        INNER JOIN ProductMeta [m]          ON [p].ProductId = [m].ProductId GROUP  BY [p].ProductID,           [p].Name  

    It can also be useful transposing aggregations with the use of…

    SUM(CASE x WHEN 'y' THEN yVal ELSE 0 END) AS SUMYVal 

    EDIT

    Also worth noting this is using ANSI standard SQL and so it will work across platforms 🙂

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

Sidebar

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer This is how I solved the problem: Put the following… May 11, 2026 at 10:08 am
  • added an answer The getDateFormat function is run as soon as Javascript is… May 11, 2026 at 10:08 am
  • added an answer None of the current options allow for having both servers… May 11, 2026 at 10:08 am

Related Questions

I put together a sample scenario of my issue and I hope its enough
I put together a class yesterday to do some useful task. I started alpha
Some time ago I put together a time based library that could be used
I have put together a script which is very much like the flickr photostream
Greetings: I have put together a RESTful web service in .NET 3.5 that takes
I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it
I am starting to put together a system architecture document for a new project
I have a utility that I put together that uses the .NET Framework to
For testing purposes I'm planning to put together a little app that will listen
I find AWK really useful. Here is a one liner I put together to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.