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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:37:22+00:00 2026-05-13T15:37:22+00:00

I am having data like: ItemCode Attribute PositionID ITEM-000032 CHESTSIZE 1 ITEM-000032 JACKETLEN 2

  • 0

I am having data like:

ItemCode          Attribute      PositionID   
ITEM-000032 CHESTSIZE   1
ITEM-000032 JACKETLEN            2
ITEM-000042 CHESTSIZE            1
ITEM-000042 JACKETLEN            2
**ITEM-000049   SLACKWAIST  1**
ITEM-000071 CHESTSIZE            1
ITEM-000071 JACKETLEN            2
ITEM-000074 CHESTSIZE            1
ITEM-000074 JACKETLEN            2

In above data except ITEM-000049 others are having perfect combination. so i want to create a new row for ITEM-000049
As

ITEM-000049 --  2

to make it perfect.

Kind regards,
Om

  • 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-13T15:37:22+00:00Added an answer on May 13, 2026 at 3:37 pm

    Sounds like for each ItemCode, you are expecting 2 records, for 2 different Attributes.

    So something like this is what I think you’re after. Just run the SELECT part of it first without the INSERT to check it is indeed what you’re after.

    INSERT YourTable (ItemCode, Attribute, PositionID)
    SELECT t.ItemCode, 'SECOND ATTRIBUTE', 2
    FROM 
    (
    SELECT ItemCode
    FROM YourTable
    GROUP BY ItemCode
    HAVING COUNT(*) = 1
    ) t
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having data like below: <ProductAttributes> <Attribute> <ItemCode>ITEM-0174676</ItemCode> <AttributeCode>host_interface</AttributeCode> <AttributeDescription>Host Interface</AttributeDescription> <AttributeValueCode>usb</AttributeValueCode> <AttributeValueDescription>USB</AttributeValueDescription>
i have two sheets having data like this sheet1 : **A** **B** **C** 752
I'm having data as like below. I need to plot graph based on region.
I am having my core data model like this: EntityA <---->> EntityB <<----> EntityC
I'm having trouble rendering out a template, my data looks like this: var data
i am having an form for uploading an excel file like <form enctype=multipart/form-data action=http://localhost/joomla/Joomla_1.5.7/index.php?option=com_jumi&fileid=7
I have a database with a name column having data like 'Very big News'
I have list having data like a, b, c, d, e, f, g, h,
I need some help to build SQL Query. I have table having data like:
I need some help to build SQL Query. I have table having data like:

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.