Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jassie
Constraint Violating Yak Guru
332 Posts |
Posted - 2014-01-20 : 23:10:14
|
In an existing ssrs 2008 r2 application, I am having a problem trying to understand the existing logic.I am hoping you can it explain the logic to me of how the parts are tied together for both part 1 and part 2:1. The following is Part 1: a. The main sql the SELECT sum(case when @AbsT like '%UN1%' then [absUN1] else 0 end) + sum(case when @AbsT like '%AB1%' then [absAB1] else 0 end) + sum(case when @AbsT like '%IL1%' then [absIL1] else 0 end) + sum(case when @AbsT like '%ME1%' then [absME1] else 0 end) + sum(case when @AbsT like '%SU1%' then [absSU1] else 0 end) + sum(case when @AbsT like '%TR1%' then [absTR1] else 0 end) as SelectedAb1 FROM [OP1].[dbo].[AttReport] where SelectedAb1 > isnull(@AMin,-1) and SelectedAb1 <= isnull(@AMax,100) b. The following is the dataset and parameter that refer to the sql above: @AbsT is the parameterselect 'AB1' as value, 'Absent (ABS)' as Labelunionselect 'IL1', 'Ill (ILL)'unionselect 'ME1','Medical (MED)'unionselect 'SU1','Sus (SUS)'unionselect 'TR1','Tru (TRU)'unionselect 'UN1','Unverify (UNV)'Can you explain to me how the parameter listed above is used by the sql listed above?2. The following is part 2:a. The following is the sql behind the parameter called AbsMinMaxselect 0 as Numunionselect 1unionselect 2unionselect 3unionselect 4unionselect 5b. the following are the parameter values a user enters: @AMin as int, @AMax as int,c. the following is the where clause: where SelectedAb1 > isnull(@AMin,-1) and SelectedAb1 <= isnull(@AMax,100) Can you explain how the items listed under part 2 are tied together? Can you explain he logic? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2014-01-21 : 07:21:45
|
I answered this in other forum. Is this still a concern?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
jassie
Constraint Violating Yak Guru
332 Posts |
Posted - 2014-01-21 : 09:47:40
|
no |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2014-01-22 : 08:24:37
|
quote: Originally posted by jassie no
ok good------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|
|
|