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.

ruby - Need help in SQL and Sequel involving inner join and where/filter -


need transfer sql sequel:
sql:

select table_t.curr_id table_t inner join table_c on table_c.curr_id = table_t.curr_id  inner join table_b on table_b.bic = table_t.bic table_c.alpha_id = 'xxx' , table_b.name='foo'; 

i'm stuck in sequel, don't know how filter, far this:

 cid= table_t.select(:curr_id).                     join(:table_c, :curr_id=>:curr_id).                     join(:table_b, :bic=>:bic).                     filter( ????? )   

answer better idiom above appreciated well.tnx.

update:
have modify little make works

cid = db[:table_t].select(:table_t__curr_id).   join(:table_c, :curr_id=>:curr_id).   join(:table_b, :bic=>:table_t__bic). #add table_t or else error: column table_c.bic not exist   filter(:table_c__alpha_id => 'xxx',          :table_b__name => 'foo') 

without filter,

cid = db[:table_t].select(:table_t__curr_id).                     join(:table_c, :curr_id=>:curr_id, :alpha_id=>'xxx').                     join(:table_b, :bic=>:table_t__bic, :name=>'foo') 

btw use pgsql 9.0

this pure sequel way:

cid = db[:table_t].select(:table_t__curr_id).   join(:table_c, :curr_id=>:curr_id).   join(:table_b, :bic=>:bic).   filter(:table_c__alpha_id => 'xxx',          :table_b__name => 'foo') 

note can without where, since using inner join:

cid = db[:table_t].select(:table_t__curr_id).   join(:table_c, :curr_id=>:curr_id, :alpha_id=>'xxx').   join(:table_b, :bic=>:bic, :name=>'foo') 

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 -