All you want is a list of tickets by employeeId with the employee name?

You confused us all with the database term, I guess - if I am reading
your question correctly, you mean two tables, not two databases (a
database is a collection of tables).

Keep it simple - use iBATIS (or jdbc) and put the results into a map:

<select id='getTicketsByEmployeeId' resultclass="java.util.HashMap">
select t.*, employee.name
from ticket t
join employee e on t.employeeId = e.employeeid
where e.employeeid = #value#
</select>

Done. One (indexed and very fast) hit on the database and you are done.

Larry


On 4/7/06, olonga henry <[EMAIL PROTECTED]> wrote:
> Neither. List of open tickets that can belong to any employee.
> It's just happens that I want to display the name of the employee instead of
> their Ids.  I have been telling this in every email.  But you people don't
> seem to get this.
>
>
>
> On 4/7/06, Rick Reumann <[EMAIL PROTECTED]> wrote:
> >
> > olonga henry wrote the following on 4/7/2006 10:21 AM:
> > > After getting the ticket list, I will have to read the employeeIds first
> > in
> > > memory then make those calls and put 'em in a hashmap so that I can
> > disply
> > > 'em properly in the hashmap.
> >
> > I've been following this thread, and it's amazing how overcomplicated
> > people are making all of this. I'd love to know exactly from a "user's
> > perspective" what you want to accomplish ologna. All of this "don't use
> > a join" nonsense is just silly (to be polite:) Although, more than
> > likely you don't need to get everything back on the initial display of
> > your employees.
> >
> > Do you just want to display an Employee record and a list of tickets
> > that belong to the employee????
> >
> > --
> > Rick
> > http://www.learntechnology.net
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to