report structure listed below:
report-1 in Customer-a call sp_DBR_report-1-a
report-1 in Customer-b call sp_DBR-report-1-b
There is only different with Customer between sp_DBR-report-1-a and sp_DBR-report-1-b
,now i want to migrate two procedure to one called sp_DBR-report-1,because the number of customer will raised up quickly,i can't image if i create a separately stored procedure for each customer, So my question is: how to get the CustomerID(something like this) from mydbr to stored procedure,if i use parameter of stored procedure,Any Customer can look others data via entering other customer's ID(or something like this),so i can't use it ,because i don't to let customer-a view customer-b's data ,It is a secure data
Is there any way to implement my requirement?