Topic
  • 1 reply
  • Latest Post - ‏2004-10-26T10:20:19Z by SystemAdmin
SystemAdmin
SystemAdmin
93 Posts

Pinned topic Query SubSelect and Multi Table Join

‏2004-08-12T16:54:38Z |
Hi,

I need to execute the following query to bring in my source:

select * from tbl1 where btch_id = select max(btch_id) from tbl2

How can I do this efficiently using Relational Stage?

Also, is there a more efficient way of joining > 2 tables without using Lookup Stages after the initial Join Stage?

Thank you,
SB
Updated on 2004-10-26T10:20:19Z at 2004-10-26T10:20:19Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    93 Posts

    Re: Query SubSelect and Multi Table Join

    ‏2004-10-26T10:20:19Z  
    put parenthesis around the second select statement and give it an alias. Then you can refer to the fields within the sub-select using the alias.