equijoins with column aliases

  • Thread starter Thread starter rbutch
  • Start date Start date
R

rbutch

hey guys ran into something this weekend doing a three table equijoin and comparing columns that are identically named.
i've surrounded them with parenthesis so you can see which ones im doing.
basically ASP.NET gives me fits when binding the columns for a datagrid in the asp:boundcolumn property.
evidently it has to match exactly and i need to display both columns so a comparison can be made.
but, it doesnt like the column aliases. would it make a difference if i used the whole table name?
Now this is no problem to do in VB.NET, but i would like to do this on the web.

ive also tried using the full table name i.e.:: org_security.org_lvl_2

SELECT o.lgon_id,e.empl_id,(o.org_lvl_2,e.org_lvl_2)
,u.pers_desc,u.last_access_date,o.org_lvl_1,o.org_lvl_2,o.org_lvl_3,o.org_lvl_4 from org_security o, empl_profile e, usr_sys_user u where o.lgon_id = u.lgon_id and u.empl_id = e.empl_id and o.org_lvl_1 in('FSHH','FSHE','FSHC','FSA3','FSA2','FSA1','FCGS','FCGO') and e.org_lvl_1 NOT IN ('OPTM','OPPU','OPTS') AND o.org_lvl_2 <>e.org_lvl_2 and u.pers_desc NOT LIKE 'TO%' and o.org_lvl_2 <>'*' order by e.org_lvl_2,o.lgon_id"


thanks for any insite into this
rik

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
problem solved. it seems when i have a problem, i post it here and then 5 minutes later, the answer comes to me.
i just selected "create columns automatically at runtime" and let it happen dynamically
thanks again
rik

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
Back
Top