ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin" <clinton.be...@gmail.com>
Subject RE: Nested Select Statement or Nested Select Elements
Date Mon, 11 Feb 2008 16:23:23 GMT
I think this is more of an issue with your understanding of SQL than it is
with iBATIS.  See, the nested SQL statement is not "exposed" to the caller.
It can only be used internally (except perhaps if you had put it in the FROM
clause and subsequently included it in the SELECT clause of the "parent"
statement...)

 

So, I don't think the question makes sense.  You write the nested select
like you would anywhere else.  It doesn't change the inputs (parameters) and
outputs (select clause of the outermost statement) available for iBATIS to
work with.

 

clinton

 

From: kiran vuppla [mailto:kirankumar_vuppla@yahoo.com] 
Sent: February-11-08 6:24 AM
To: user-java@ibatis.apache.org; lmeadors@apache.org
Subject: Re: Nested Select Statement or Nested Select Elements

 

Thanks for the info. I have seen the tutorial but I havent found it as I
assume it might not documented regarding the nested select elements. I knew
how to write the nested select query. I would like to know is it same or
different in writing a nested select statement in IBatis config file that we
write in Oracle toad  or store procedures.

 

Thanks

KV

 


Larry Meadors <lmeadors@apache.org> wrote:

Please don't ask the people on the list to write "hello world" for
you, it's incredibly disrespectful to assume that their time is best
spent teaching you things that are already freely available.

Go to www.google.com and enter "ibatis java tutorial" (or click here
-> http://www.google.com/search?q=ibatis+java+tutorial <-). You'll get
literally thousands of hits. Pick a couple and work through them.

Once you've put in a couple of hours (or days), and you're really
struggling with something, come on back and ask. We're a pretty
helpful bunch most of the time.

Larry


On Feb 10, 2008 3:25 PM, kiran vuppla wrote:
> Hi,
> I am new to IBatis and am in learning curve stage. I would like to know
> how to write a nested select statement in the IBatis SqlMapConfig file.
>
> My nested Oracle Select Statement:
>
> select *
> from table1
> where val1 in (
> select val from /* Self Join */
> table2 a, table2 b
> where a.val = b.val
>
> and b.id = id
> and a.id != id;
> )
>
>
> I would like to know how to write a nested [           \/] element in
IBatis in the
> config file.
>
> Thanks,
> KV
> ________________________________
> Looking for last minute shopping deals? Find them fast with Yahoo! Search.
>
>
> ________________________________
> Looking for last minute shopping deals? Find them fast with Yahoo! Search.

 

  

  _____  

Looking for last minute shopping deals? Find
<http://us.rd.yahoo.com/evt=51734/*http:/tools.search.yahoo.com/newsearch/ca
tegory.php?category=shopping>  them fast with Yahoo! Search.


Mime
View raw message