简体   繁体   中英

How to get data from Stored Procedure in form of two tables?

I have two tables 1. Staff 2. Clients Each Staff has some Clients. I want to write an Stored Procedure that returns me staff name and it's clients name and Clients address. How can I achieve this? I want to make a report from the returned result which will be like this: 在此处输入图片说明

This staff has three clients and their addresses are being shown respectively. This is just an example. I can have more than one staff. This report is in simple HTML, I have to make it in SQL Server Reporting Services. Any help would be appreciated.

Create a query that joins the Staff and Client tables together, and in SSRS, group by the staff name. It's pretty simple to do.

HTH.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM