开发者

SQL Server Reporting Service - Reference another dataset?

开发者 https://www.devze.com 2023-02-13 06:17 出处:网络
开发者_开发知识库I have two datasets in a SQL Server 2008 reporting services report. I need to attach a WHERE clause to the second one that will contain a value from the first one. How should I write

开发者_开发知识库I have two datasets in a SQL Server 2008 reporting services report. I need to attach a WHERE clause to the second one that will contain a value from the first one. How should I write that second query?


If I understand what you are asking, you should run a SUB query within the where clause.

SELECT title FROM books WHERE author_id IN (SELECT id FROM authors);

0

精彩评论

暂无评论...
验证码 换一张
取 消