Re: Using #PARAM# constructions within $DYNAMICSQL$

2009-05-05 Thread DelGurth
On Wed, Apr 29, 2009 at 12:24 AM, DelGurth wrote: > Hi, > > I was wondering if it was possible to use #PARAM# constructions within > a $DYNAMICSQL$ query.I'm currently using iBatis sqlmap 2.3.0. And I'm > trying to get the following to work: > > SELECT * FROM person >  $DYNAMICSQL$ > > With $DYNAM

Re: Using #PARAM# constructions within $DYNAMICSQL$

2009-04-29 Thread DelGurth
On Wed, Apr 29, 2009 at 4:58 PM, Jason King wrote: > Is there some reason you can't use the dynamic where clause feature in > iBatis. > > This is an example stolen directly from Clinton's book. > > > resultClass="Category"> > > SELECT * > > FROM category > > > > > > parentCategoryId IS NULL > >

Re: Using #PARAM# constructions within $DYNAMICSQL$

2009-04-29 Thread Jason King
Is there some reason you can't use the dynamic where clause feature in iBatis. This is an example stolen directly from Clinton's book. SELECT * FROM category parentCategoryId IS NULL parentCategoryId=#parentCategoryId# Doing dynamic

Re: Using #PARAM# constructions within $DYNAMICSQL$

2009-04-29 Thread DelGurth
On Wed, Apr 29, 2009 at 2:44 PM, Chris O'Connell wrote: > I sympathize with your problem.  Perhaps you could just build a set of sql > includes, each of which is the correct sql for a particular use case.  Then, > rather than building the sql string in your code, you instead just pass a > paramete

Re: Using #PARAM# constructions within $DYNAMICSQL$

2009-04-29 Thread Chris O'Connell
I sympathize with your problem. Perhaps you could just build a set of sql includes, each of which is the correct sql for a particular use case. Then, rather than building the sql string in your code, you instead just pass a parameter into iBatis that it can use to determine which is the correct s

Re: Using #PARAM# constructions within $DYNAMICSQL$

2009-04-29 Thread DelGurth
On Wed, Apr 29, 2009 at 5:30 AM, Nathan Maves wrote: > I have not tried this but I don't see why it would not work. > > > SELECT * FROM person >  WHERE person.lastname LIKE '%'||#lastname#||'%' > > the || is the concat operator for oracle.  it might be something else in > another vendor Probably

Re: Using #PARAM# constructions within $DYNAMICSQL$

2009-04-28 Thread Nathan Maves
I have not tried this but I don't see why it would not work. SELECT * FROM person WHERE person.lastname LIKE '%'||#lastname#||'%' the || is the concat operator for oracle. it might be something else in another vendor On Tue, Apr 28, 2009 at 4:24 PM, DelGurth wrote: > Hi, > > I was wondering