SQL Query - Pass Parameter?

I’ve created a SQL query report that pulls price list data for our customers when they log in. But I have created 15 separate queries for each customer. If/when I need to update the query, I need to do redo it for each customer.

Is there a way in the SQL Query Report I can pass the Customer name that the user is tied to and that will filter the query? That way I can just have one report that will satisfy all my customers and filter based on their company.

I found this post, but it’s not much help to me: SQL Query Report - #3 by mehta_akshay

Any suggestion is appreciated.

Thank you.

  1. provide the query report code
  2. explain how you link login account to the customer, i.e how the query code to filter records based on current login user.