You are not logged in.
Dear users of this forum,
we are pleased to inform you that we will be updating the software behind this forum in the near future.
Existing posts, users and categories will remain untouched.
Important:
We will keep you informed in the pinned thread.
Kind regards,
Your ReportServer Team
Liebe Nutzer dieses Forums,
wir freuen uns, euch mitteilen zu können, dass wir in naher Zukunft die Software hinter diesem Forum aktualisieren werden.
Existierende Beiträge, Nutzer und Kategorien bleiben weiterhin bestehen!
Wichtig:
Wir halten euch im angepinnten Beitrag auf dem Laufenden!
Mit vielen Grüßen
Euer ReportServer Team
We want to use multi-statement sql with a dynamic list report. For example:
DROP TEMPORARY TABLE IF EXISTS tmpEntIds;
CREATE TEMPORARY TABLE tmpEntIds
(
entity_id INT NOT NULL PRIMARY KEY
);
INSERT INTO tmpEntIds
SELECT DISTINCT entity_id FROM XXX.YYYY ldp WHERE ldp.end_date IS NULL;
SELECT *
FROM XXX.ZZZ t
WHERE t.entity_id IN (SELECT entity_id FROM tmpEntIds);
I get an error when we try to run this. Is there another way to send multiple statements?
Offline
Dear bpikes,
it is not possible to execute several sql statements within a dynamic list on a Relational Database datasource. I might not fully understand your example but would it not be possible to use a subquery like that:
SELECT *
FROM
XXX.ZZZ t
join (SELECT DISTINCT entity_id FROM XXX.YYYY ldp WHERE ldp.end_date IS NULL) u
on t.entity_id = u.entity_id
? wbr jan
Offline