Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE [dbo].[crud_tst-chart3_getItems]
- @filters CRUDFilterParameter READONLY,
- @sort sql_variant,
- @direction nvarchar(8),
- @page int,
- @pageSize int,
- @username nvarchar(32)
- AS
- BEGIN
- declare @langID int
- select @langID = try_cast(Value as int) from @filters where [Key] = 'langID'
- declare @result TABLE (title nvarchar(256), value nvarchar(256), color nvarchar(64) )
- insert into @result
- select iif(@langID=1, 'Customers', 'Заказчиков') Title, '1,3,7,8,12' Value, 'green' Color
- union
- select iif(@langID=1, 'Orders', 'Заказов') Title, '3,7,5,12,9' Value, 'blue' Color
- union
- select iif(@langID=1, 'Income, dollars', 'Доход, тыс.руб.') Title, '5,15,12,18,16' Value, 'red' Color
- -- 1 SELECT - сами данные
- select * from @result
- -- 2 SELECT - кол-во в таблице
- select count(*) from @result
- -- 3 SELECT Дополнительные настройки таблицы
- select 'chart' ViewType, 'line' ChartType, iif(@langID=1, 'March 2020', 'Март 2020') ChartTitle, 0 ChartWidth, 0 ChartHeight, '5,10,15,20,25' ChartLineCommaLabels, 1 hideTitleCount,
- iif(@langID=1, 'Company stat', 'Статистика работы компании') Title
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement