Hello,
I'm new to SQL queries and need to build a custom report in Microsoft SQL Report Builder 3.0. The data source is SCCM database. I need help with understanding the best approach to achieve the following:
- We need to cross reference if a computer exist in two Views, if so show that name in the report.
- Parameter1 = "Please select a Collection"
- Parameter2 = "Cross reference with this other Collection"
If I know the Collections beforehand I have a query to get what I need from the SQL server, but I need to create a parameter-based report where you select two Collections dynamically and the report cross reference them for you.
This is the query I can use for a static result:
SQL
SELECTv_GS_SYSTEM.Name0FROMv_GS_SYSTEMWHEREName0IN(SELECTNamefromv_CM_RES_COLL_CMS0020B)ANDName0IN(SELECTNamefromv_CM_RES_COLL_CMS000D1)