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 - two updates using the same CTE -


i have "unremove" folders in arborescence (thay have been flagged removed, change value of flag). each folder can contain files or folders (which stored in different tables). have cte defines folders need updated.

 arbre(id) as(      select iddossier      portail_managers_dossier      iddossier = @id      union      select d.iddossier      portail_managers_dossier d      inner join arbre      on a.id = d.idparent) 

then have 2 update request, 1 each table

 update portail_managers_dossier  set dtdatesuppr = null  iddossier in (select id arbre);    update portail_managers_document  set dtdatesuppr = null  iddossier in (select id arbre); 

my problem : don't know how merge 2 update requests on different tables. cte exists until end of request, have define twice. there way write of above code in single request ?

as have discovered, cte's lose scope after first update. but, instead of using cte, why not write results of query within cte temp table, , updates based on contents temp table?


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 -