Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE [dbo].[crud_tst-chart2_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 float, color nvarchar(64) )
- insert into @result
- select 'Smartwatch' Title, 104 Value, 'pink' Color
- union
- select 'Videocard' Title, 102 Value, 'powderBlue' Color
- union
- select 'Kyboard' Title, 91 Value, 'lightGreen' Color
- union
- select 'Transmitter' Title, 70 Value, 'aqua' Color
- union
- select 'Voice recorder' Title, 24 Value, 'lightGrey' Color
- -- 1 SELECT - сами данные
- select * from @result
- order by Value
- -- 2 SELECT - кол-во в таблице
- select count(*) from @result
- -- 3 SELECT Дополнительные настройки таблицы
- select 'chart' ViewType, 'bar' ChartType, iif(@langID=1, 'By quantity sold', 'По количеству проданного') ChartTitle, 0 ChartWidth, 0 ChartHeight, 1 HidetitleCount,
- iif(@langID=1, 'Top 5 Popular Products', 'Топ 5 популярных продуктов') Title
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement