hi evry one,

my problem statement is i have table as follows

jobId | stagename             | Count

623     Technical Screening      5 
623     Technical InterView      3
623     Second Interview         6
623     Final Interview          7
623     Hr Interview             1

i want Query To Display result as given below

jobId |Technical Screening | Technical InterView |Second Interview | Final Interview |HrInterview

623 5 3 6 7 1

Recommended Answers

All 5 Replies

show some effort, to get any help.

i want to convert above result by using qury that is written in storeprocedure

I did not ask what you want ,but what you have tried so far.

tried using

SELECT ITEM_CODE,
SUM(IF(RETAIL_ID=’A',SALES,0)) AS ‘A’,
SUM(IF(RETAIL_ID=’B',SALES,0)) AS ‘B’,
SUM(IF(RETAIL_ID=’C',SALES,0)) AS ‘C’
FROM RETAIL_INFO
GROUP BY ITEM_CODE

i will get above resluted table by hardcode stage name

but i want to generate dynamic

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.