Query not returning enough rows

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
dbxsda445src
Posts: 8
Joined: Mon 09 Jan 2012 09:46

Query not returning enough rows

Post by dbxsda445src » Tue 11 Jun 2019 08:21

Hi,

I have a query that works fine in MS SQL Servermanagement Studio, but if I use it with the DBExpress Driver it does not return all rows. I have never had this problem with "normal" queries.
This is the query:

use bi2
select
pvt.locationid,
pvt.[1] as op1,
pvt.[4] as op2,
pvt.[5] as op3,
pvt.[9] as op4,
pvt.[27] as op5,
pvt.[11] as op6,
pvt.[28] as op7,
pvt.[12] as op8
from (
select locationid,standaardid,score from zelfevaluatie
) as temp
pivot (max(score) for standaardid in ([1],[4],[5],[9],[27],[11],[28],[12])) as pvt

Why does it not return all rows as in the Management Studio?
I use version 7.4.6.

Greetings,
Ronald

dbxsda445src
Posts: 8
Joined: Mon 09 Jan 2012 09:46

Re: Query not returning enough rows

Post by dbxsda445src » Tue 11 Jun 2019 10:22

Solved. A dumb mistake of mine, I tested it on a testserver but ran the testscript on a productionserver.
Sorry.

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: Query not returning enough rows

Post by Stellar » Wed 03 Jun 2020 13:26

Glad to see that the issue was resolved.
Feel free to contact us if you have any further questions about our products.

Post Reply