Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

SQL SERVER Query Help (using cursor?) -


the query below calcuates percertage of product between fy2009 vs. fy2010 california. assigned calculate remaining states (please see states table). there way in sql server calculate states percentages? manually calculate each state @ time. wondering if me this. happy holidays everyone!!! (please note, must use states table seperately due data integrity. thinking if cursor it, not there yet.)

declare @location varchar(2) set  @state = 'ca'   select number1/cast(number2 float) percentage (     select count (product) number1     sometable1     location = @state     , date >='10/1/2008'     , date  <' 10/1/2009' )x,  (     select count (product) number2     sometable2     location = @state     , date >='10/1/2009'     , date  <' 10/1/2010' )y  percentage 1.400742   select state states  state ca az tx nv nm ut or co wa 

you can join on states table. along these lines:

select x.state, x.number1/cast(y.number2 float) percentage (     select s.state, count(*) number1     sometable1 s1     inner join states s on s1.location = s.state     , s1.date >='10/1/2008'     , s1.date < '10/1/2009'     group s.state )x,  (     select s.state, count (*) number2     sometable2 s2     inner join states s on s2.location = s.state     , s2.date >='10/1/2009'     , s2.date < '10/1/2010'     group s.state )y x.state = y.state 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -