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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:52:53+00:00 2026-06-03T22:52:53+00:00

My query pulls list of bug items by jira issue (goes specific to component

  • 0

My query pulls list of bug items by jira issue (goes specific to component of jira), I need to find out how can i enter multiple pkey in this query, single pkey works fine, however when I declare multiple pkey it throws an error message.

In following query, abc-123 is a jira bug id, subquery finds component name and 2nd subquery will fetch project name, remaining query will pull list of bugs associated with the component, I would like to enter ‘def-456’, ‘jdk-985’ next to ‘abc-123’ , I tried setting new variable however it did not work, can someone please help

$

set @pkey := 'abc-123';

select jiraissue.*, co.* 
from jiraissue,project,issuetype,nodeassociation,component,
customfieldvalue cv
,customfieldoption co 
where 
component.cname = (SELECT component.cname
FROM nodeassociation, component, jiraissue
WHERE component.ID = nodeassociation.SINK_NODE_ID
AND jiraissue.id = nodeassociation.SOURCE_NODE_ID
AND nodeassociation.ASSOCIATION_TYPE = 'IssueComponent'
AND pkey = @pkey) and 
project.pkey = (SELECT substring_index(jiraissue.pkey,'-',1) as project_name
FROM nodeassociation, component, jiraissue
WHERE component.ID = nodeassociation.SINK_NODE_ID
AND jiraissue.id = nodeassociation.SOURCE_NODE_ID
AND nodeassociation.ASSOCIATION_TYPE = 'IssueComponent'
AND pkey = @pkey) and 
issuetype.pname = 'Bug' and
jiraissue.project = project.id and 
jiraissue.issuetype = issuetype.id and 
nodeassociation.association_type = 'IssueComponent' and
nodeassociation.source_node_entity = 'Issue'  and
nodeassociation.source_node_id = jiraissue.id  and
nodeassociation.sink_node_entity = 'Component'  and
nodeassociation.sink_node_id = component.id 
and jiraissue.id = cv.issue
and cv.stringvalue = co.id
and cv.customfield = 10020;
  • 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-03T22:52:55+00:00Added an answer on June 3, 2026 at 10:52 pm

    Try replacing

    AND pkey = @pkey
    

    with this:

    AND pkey in (@pkey, @pkey1, @pkey2)
    

    and then at the top:

    set @pkey := 'abc-123', @pkey1 := 'def-456', @pkey2 = 'ghi-789'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today I found this query in our code that pulls up a list of
I have a query I need some help with, have been checking out a
I have a query that pulls back a user's feed which is essentially all
I have a query which pulls a count from a DB by searching by
I have a LINQ to ENTITY query that pulls from a table, but I
I have the following query. It works just fine but I need to pull
Query: SELECT DISTINCT ([Equipment List].ID) AS Expr1, [Job Assignments].Job FROM [Equipment List] LEFT JOIN
Currently I've got a PHP page query.php with a form that presents a list
*EDIT*** I've made great progress by combining the main query that pulls the airwaves
Using mysql and PHP, I'd like to setup a query which pulls a problem

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.