Solved

using greater than function in db2

Posted on 2009-04-07
3
1,765 Views
Last Modified: 2012-05-06
hi friends

i have a query in db2 like this

select A.FIRST_NAME, A.LAST_NAME, count(A.ID)
from schema.USERS A where count(A.ID) > 1
GROUP BY A.FIRST_NAME, A.LAST_NAME;


basically i want to retrieve first names and last names of those who have more than one
Id.


a person can have more than one Id . example data

firstname     lastname     userid

raj                  becker       100
raj                  becker       200
sam                 raian        300

but in the query :: count(A.ID) > 1  doesnt seem to work

any ideas greatly appreciated

thanx
J
0
Comment
Question by:jaggernat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 32

Accepted Solution

by:
awking00 earned 500 total points
ID: 24090573
See attached.
count.txt
0
 
LVL 10

Author Comment

by:jaggernat
ID: 24090993
that was great!!

thank you.
J
0
 
LVL 32

Expert Comment

by:awking00
ID: 24091029
Glad to help.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question