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 - parsing comma seperated values in MS-SQL (no csv or such) -


i use closed source commercial application uses ms-sql database. regularly have query database myself various purposes. means table , database design fixed, , can't @ all. have live it. have 2 tables following layouts (abstracted, not discredit software/database designer)

t1: id (int), att1(varchar), att2(varchar), .... attx(varchar)  t2: id (int), t1_ids(varchar) 

now contents of t1_ids (shudder) comma separated list of t1 id's. (for example 12, 456, 43, 675, 54). want (you guessed it) join 2 tables.

fortunately me, these small tables, , don't care performance in terms of complexity @ (could o(n^m) far care).

ideally make view joins these 2 tables. don't have requirements inserting or updating, select statements. easiest , clearest (in terms of maintainability) way this?

to first , last use this:

select *  t1      join t2 on '%,' + t1.id + ',%' ',' + t2.t1_ids + ',' 

it doesn't matter if t2.t1_ids start or end . valid values enclosed commas.


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 -