How to Join 2 Tables in SSRS

SQL Server Reporting Services (SSRS) lets database developers and administrators create reports that users can read from their desktops. When you create reports, you must join tables to link data in separate locations. For instance, you must link a customers and orders table to get a list of orders for each customer. You use SQL Server Management Studio and the "inner join" statement to link the two tables for SSRS reports.

Instructions

    • 1

      Click the Windows "Start" button and select "All Programs." Click "Microsoft SQL Server," then click "Management Studio" to open the database software.

    • 2

      Click your reporting server name in the left panel to make it your active database. Click "New Query" to open the query editor for the reporting server.

    • 3

      Type the "join" statement in the editor. For instance, the following code links a customer and order tables:

      select * from customers c inner join orders o on o.customerid=c.customerid

      The code above joins a customer and order table using the "customerid" field.

    • 4

      Press the "F5" keys to run the SQL statement. The results display the linked tables and the tables' data results.

Related Searches:

References

Comments

Related Ads

Featured