Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE [dbo].[crud_tst-chart6_getItems]
- @filters CRUDFilterParameter READONLY,
- @sort sql_variant,
- @direction nvarchar(8),
- @page int,
- @pageSize int,
- @username nvarchar(32)
- AS
- BEGIN
- declare @result TABLE (title nvarchar(256), value int, color nvarchar(128))
- declare @langID int
- select @langID = try_cast(Value as int) from @filters where [Key] = 'langID'
- insert into @result
- select 'First company' title, 55 Value, 'pink' color
- union
- select 'Petrov PE' title, 40 Value, 'powderBlue' color
- union
- select 'Ivanov PE' title, 27 Value, 'lightGreen' color
- union
- select 'Condition Limited' title, 22 Value, 'aqua' color
- union
- select 'GorGarSnabStryServiceBit' title, 18 Value, 'lightGrey' color
- -- 1 SELECT - сами данные
- select * from @result
- -- 2 SELECT - кол-во в таблице
- select count(*) from @result
- -- 3 SELECT Дополнительные настройки таблицы
- select 'chart' ViewType, 'polarArea' ChartType, iif(@langID=1, 'By order count', 'По количеству заказов') ChartTitle, 0 ChartWidth, 0 ChartHeight, 1 HidetitleCount,
- iif(@langID=1, 'TOP 5 Active customers (2)', 'Топ 5 наиболее активных заказчиков (2)') Title
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement