alias problem in select fields query

2009-05-03
2013-04-25
  • sateesh pabboju

    sateesh pabboju - 2009-05-03

    select u1.id as u1id,u2.id as u2id from users u1, users u2 where u1.id=u1.id limit 0,5

    it gives Error executing report query: Column 'id' not found.

    when I do not use alias and write query
    select u1.id,u2.id from users u1, users u2 where u1.id=u1.id limit 0,5
    It give output, but now two columns showing id as column headers.

    Is it bug in openreports or am I missing something.

     
    • sateesh pabboju

      sateesh pabboju - 2009-05-03

      I got the trick. Event though it's not allowing column aliasing in main query level, it's working properly like this. So it serves the purpose

      select a.* from  ( select u1.id as u1id,u2.id as u2id from users u1, users u2 where u1.id=u1.id )a

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks