Question

  Asked: Dec 18 2007   4:38 PM GMT
  Asked by: Karen123


Query Question


AS/400 Query, AS/400

okay, first let me apologize for my general lack of knowledge about my computer system. We don't have anyone in house that can help so I turn to this site for hopefully an answer. I am not sure I can even communicate effectivey my question but here goes:
I am trying to write a query with our AS400 using files from our utility billing program HTE. I have created my query, it has all the data I need, except, it lists the same records more than once. Is there a way to get it to list them only once? I am trying to make a list of all customers that have changed their level of garbage service and it is listing some records up to 9 times. This is a file I have to move into an Excel spreadsheet. Any thoughts would be greatly appreciated. Thanks
Karen Gemmell
City of Cheney
Cheney, Washington

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0



To get unique records from any file you can use DISTINCT in SELECT query.

for example-:
I have file STUD file which contains records for a student for many subjects.
following query can be used:
SELECT DISTINCT(Stud_No)
from STUD
Where Stud_No = 101;

If you need any further help then let me know.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register