How to query a Quality Center project database using the field label instead of the field name?

Question ID: 104104
2
0

How to query a Quality Center project database using the field label instead of the field name?

Marked as spam
Posted by (Questions: 23, Answers: 1)
Asked on April 29, 2010 9:35 pm
4 views
Answers (5)
4
Private answer

This example is based on and tested with QualityCenter_Demo_db database running on SQL Server 2005.
This is an example of a SQL Statement that creates a SQL Statement.

In this example:
The user seeks all the defects where the User Defined Field with the Label ''Category'' and the Category Value = ''UI Suggestion''
In the Quality Center Demo project BG_USER_05 is the field with the label ''Category''

First Run the query

select 'select * FROM td.BUG WHERE ' + A.SF_COLUMN_NAME + ' = ' + '''UI Suggestion''' as RESULT
from
(SELECT SF.SF_COLUMN_NAME, SF.SF_USER_LABEL
FROM td.SYSTEM_FIELD SF
WHERE
SF.SF_TABLE_NAME = 'BUG'
AND SF.SF_USER_LABEL = 'Category') A

The result will be:
select * FROM td.BUG WHERE BG_USER_05 = 'UI Suggestion'

Copy and run the resulting query to get the defects with a category of ''UI Suggestion''

Marked as spam
Posted by (Questions: 0, Answers: 613)
Answered on April 29, 2010 9:41 pm
Thanks Sam, you're the best!!!!!
( at April 29, 2010 9:43 pm)
No problem, your too kind.
( at April 29, 2010 9:44 pm)
0
Private answer

Very Nice !! is it possible to make this working in one single query?

Marked as spam
Posted by (Questions: 0, Answers: 1)
Answered on December 24, 2010 1:24 pm
0
Private answer

Hi Sam ,

Kindly help me out for one concern and it is very importanat for me .
Hope you will help .

I need an SQL query which keeps a record on scripts imported in QC .
FOr example : While Test plan execution i go and edit the description of another markets script in my project . There is no record who edits it and causes fuss .
I need help from you on this concern ,
I need an SQL query for Quality centre which keeps a record on the changes made by the following user in Test plan Quality centre .

Kindly Help me out for the concern ..

Let me know if you require any other details .

Regards
Thomas

Marked as spam
Posted by (Questions: 0, Answers: 3)
Answered on April 2, 2012 7:21 am
check out this article, it provides some help for history in the defects module, but you may be able to cook-up something similar in the test plan. http://eyeontesting.com/questions/970/how-to-capture-history-in-defects-module
( at April 4, 2012 4:53 pm)
0
Private answer

Hi Sam ,

Kindly help me out for one concern and it is very importanat for me .
Hope you will help .

I need an SQL query which keeps a record on scripts imported in QC .
FOr example : While Test plan execution i go and edit the description of another markets script in my project . There is no record who edits it and causes fuss .
I need help from you on this concern ,
I need an SQL query for Quality centre which keeps a record on the changes made by the following user in Test plan Quality centre .

Kindly Help me out for the concern ..

Let me know if you require any other details .

Regards
Thomas

Marked as spam
Posted by (Questions: 0, Answers: 3)
Answered on April 2, 2012 7:21 am
0
Private answer

what is the date fomat in the Q.C

thanks
valiant

Marked as spam
Posted by (Questions: 1, Answers: 1)
Answered on September 21, 2011 8:14 pm