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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:59:38+00:00 2026-06-07T03:59:38+00:00

I have this table, how can I query this table to have sample output

  • 0

I have this table, how can I query this table to have sample output below where the passed parameters are Item_Name and Spec_Name Thank you.

Item_Name   Item_Value     Spec_Name   Spec_Value
---------   ----------     ---------   ----------
Circle      Zed Circle     Diameter    180
Circle      Charlo Circle  Diameter    330
Square      Ash Square     Side        120

Sample output for Item_Name=Circle and Spec_Name = Diameter:

 Circle             Zed Circle - Diameter
 -------------     ---------------------
 Zed Circle         180
 Charlo Circle      330

I’ve try using MAX() function but it only give me 330. 🙁

Here is the whole query :

   SELECT CASE
     WHEN (ITEM_NAME = 'Circle') THEN
      MAX(ITEM_VALUE)
   END AS "Circle",
   CASE
     WHEN (ITEM_NAME = 'Circle' AND SPEC_NAME = 'Diameter') THEN
      MAX(SPEC_VALUE)
   END AS "Circle - Diameter"
  from TBL_SHAPES

Edited the user has tried this, mention in comments.

CASE WHEN (ITEM_NAME = 'Circle' AND SPEC_NAME= 'Diameter') 
THEN MAX(SPEC_VALUE) END 

thanks ahead.

  • 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-07T03:59:39+00:00Added an answer on June 7, 2026 at 3:59 am

    Have you tried using WHERE ?

    SELECT item_value AS Circle, spec_value AS Diameter
    FROM tbl_shapes
    WHERE item_name = 'Circle' AND spec_name = 'Diameter'
    ORDER BY spec_value
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone help me with this query. I have this table for sample: FILE
I have this query where I can search the TABLE_GLOBAL_PRODUCTS $catglobal_sql = select p.*,
I have this table, which can be seen as a basic custom gantt chart:
I have a table of product information with many bit columns. This table can
I have a table. In this table have select element. How can I find
i have a table like this: Table(MissioneID, Type) Type can be 1,2 or 3
I have a table like this: Application,Program,UsedObject It can have data like this: A,P1,ZZ
Possible Duplicate: How can i made a pivot for this I have a table
I can't solve this on MS Access SQL. I have a foo table with
Problem: I have a value in a database table. This value can either contain

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.