We have several tasks in our system. These tasks are listed in the grid. We have 3 different custom types ( usertypeid1,2,3). For each user, the list is different, and he can filter the list by selecting a view from the drop-down list. ViewNamethe table below shows the view you want to display. To achieve this functionality, one developer created the following table structure and saved sql fragments SQLExpressionin the table below. In my opinion, the request should not be stored in the database. What are the pros and cons of this approach and what are the available alternatives?
JobListingViewID ViewName SQLExpression UserTypeID
3 All Jobs 1 = 1 3
4 Error Jobs JobStatusID IN ( 2 ) 1
5 Error Jobs JobStatusID IN ( 2 ) 2
6 Error Jobs JobStatusID IN ( 2 ) 3
7 Speech JobStatusID IN ( 1, 3, 8 ) 1
source
share