CREATE PROCEDURE dbo.fetch_bu
     @whereCondition nvarchar(max) = ''
AS
    declare @select_query nvarchar(max) = '';
    SET @select_query = 'SELECT bu.* from dim_bu as bu'
    IF @whereCondition != ''
        BEGIN
            SET @select_query = @select_query + @whereCondition
        end
    EXEC sp_executesql @select_query;
go

