Re: Select count(*) in a resultMap

2006-01-30 Thread Ted Schrader
dual, and it worked quite > nicely. I shall have to remember this for the future. > > Mike > > -Original Message- > From: Ted Schrader [mailto:[EMAIL PROTECTED] > Sent: January 27, 2006 4:11 PM > To: user-java@ibatis.apache.org > Subject: Re: Select count(*) in a re

RE: Select count(*) in a resultMap

2006-01-27 Thread Michael Laccetti
count(*) in a resultMap Hi Michael, You've got two options that I can think of off the top of my head. A. You execute each query separately, then cobble the results together "manually" in your Java code to build an instance of "ChannelCount". B. You craft a single q

Re: Select count(*) in a resultMap

2006-01-27 Thread Ted Schrader
Hi Michael, You've got two options that I can think of off the top of my head. A. You execute each query separately, then cobble the results together "manually" in your Java code to build an instance of "ChannelCount". B. You craft a single query, assuming you have a master table for the chann

RE: Select count(*) in a resultMap

2006-01-27 Thread Michael Laccetti
d Schrader [mailto:[EMAIL PROTECTED] Sent: January 27, 2006 3:10 PM To: user-java@ibatis.apache.org Subject: Re: Select count(*) in a resultMap Hi Michael, Try giving the resulting column an alias: SELECT COUNT(*) AS MY_TOTAL FROM TABLE. Then, use "MY_TOTAL" in your result map configura

RE: Select count(*) in a resultMap

2006-01-27 Thread Fullam, Jonathan, ALABS
ubject: Re: Select count(*) in a resultMap Hi Michael, Try giving the resulting column an alias: SELECT COUNT(*) AS MY_TOTAL FROM TABLE. Then, use "MY_TOTAL" in your result map configuration. Ted On 27/01/06, Michael Laccetti <[EMAIL PROTECTED]> wrote: > > > >

Re: Select count(*) in a resultMap

2006-01-27 Thread Ted Schrader
Hi Michael, Try giving the resulting column an alias: SELECT COUNT(*) AS MY_TOTAL FROM TABLE. Then, use "MY_TOTAL" in your result map configuration. Ted On 27/01/06, Michael Laccetti <[EMAIL PROTECTED]> wrote: > > > > Is it possible to do a 'select count(*) from table' and then reference that

Select count(*) in a resultMap

2006-01-27 Thread Michael Laccetti
Is it possible to do a ‘select count(*) from table’ and then reference that value in a result map?  I’ve been searching around and trying to get it to work to no avail.   Mike