You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by AlexElba <ra...@yahoo.com> on 2009/07/20 23:19:17 UTC
question about include
Hello,
I have part of sql query which I am using in many places and I disided to
move it into <sql> and use it with include.
Everything works fine but I have question about how can I change some table
names in sql/include?
Example:
<sql id="sele">
select * from apple
</sql>
<select id="get">
<include refid="sele" />
where color=#color#
</select>
I want to pass into my sele table name from <select.. how can I do this?
--
View this message in context: http://www.nabble.com/question-about-include-tp24577751p24577751.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org
Re: question about include
Posted by AlexElba <ra...@yahoo.com>.
I read about $$ but I am not really clear how to use it?
how to include table name into <select ?
AlexElba wrote:
>
> Hello,
> I have part of sql query which I am using in many places and I disided to
> move it into <sql> and use it with include.
>
> Everything works fine but I have question about how can I change some
> table names in sql/include?
>
> Example:
>
> <sql id="sele">
> select * from apple
> </sql>
>
> <select id="get">
> <include refid="sele" />
> where color=#color#
> </select>
>
> I want to pass into my sele table name from <select.. how can I do this?
>
>
>
>
--
View this message in context: http://www.nabble.com/question-about-include-tp24577751p24578098.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org