SQL Server Reporting Service - Reference another dataset?

元气小坏坏 提交于 2019-12-24 10:06:23

问题


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?


回答1:


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);



来源:https://stackoverflow.com/questions/5099870/sql-server-reporting-service-reference-another-dataset

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!