Maintenance is complete- We've moved from the saas.hpe.com domain to softwaregrp.com click to read more
As part of our journey to complete our separation work and our future integration with Micro Focus, we've now updated our domain for the community. This is an interim step, which will be followed by a series of future update / improvements: - Piloting Idea boards - Refreshing the entire UI. (more to come later) - and more
Quality Center / ALM Practitioners Forum
cancel

Does HPALM Supports MSSQL Common Table Expressions (CTE)?

Highlighted
JonSnow
Contributor.

Does HPALM Supports MSSQL Common Table Expressions (CTE)?

The MSSQL version is Microsoft SQL Server 2014 (SP2).  HPALM version is 12.53.193.

The SQL below does not work. It returns, "Quality Center cannot run the query because it contains invalid statements."

With t1 (AL_FATHER_ID, AL_DESCRIPTION) AS
(
select AL_FATHER_ID, AL_DESCRIPTION
from all_lists t
where t.al_father_id = '2'
)
select AL_FATHER_ID, AL_DESCRIPTION from t1

I added the select wrapper. It returns, "Incorrect syntax near the keyword WITH." But, I am not sure what's wrong with the keyword "WITH."

select *
from
(
With t1 (AL_FATHER_ID, AL_DESCRIPTION) AS
(
select AL_FATHER_ID, AL_DESCRIPTION
from all_lists t
where t.al_father_id = '2'
)
select AL_FATHER_ID, AL_DESCRIPTION from t1
) as sample

Does CTE MSSQL even work for HPALM? If yes, need your thoughts/help.

2 REPLIES
david_fu
New Member.

Re: Does HPALM Supports MSSQL Common Table Expressions (CTE)?

Please let us know how you execute the query?

CTE is used in ALM internally, but in some situations (like "Execute Query" function in Site Admin) it doesn't work.

JonSnow
Contributor.

Re: Does HPALM Supports MSSQL Common Table Expressions (CTE)?

I executed it from Dashboard > Analysis View