1. Marc James
  2. PowerBuilder
  3. Friday, 13 March 2020 09:49 AM UTC

How do I stop duplicates happening when I have linked some information from another table?

Scenario - I am displaying a list of invoices, which you can expand to see some of the detail of each item on that invoice.

The invoices are stored in the move table, and are grouped by number22 (invoice number in my software)

The users full names are stored in the base table, the user pin no. in the base table is number1, and we also stamp the user pin no. into the move table against the invoice in number28. The user full name is stored in string1 of the base table.

So I attempted to bring in the full name (string1) from the base table where base.number1 = move.number28, but then it brings back an unlimited amount of rows instead of the 3000 odd there are.

You can see me trying this in the video below

https://youtu.be/U_yTDduiFCw

Marc James Accepted Answer Pending Moderation
  1. Friday, 13 March 2020 11:19 AM UTC
  2. PowerBuilder
  3. # 1

Fixed it by just using a DropDownDW on the field itself

Comment
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Friday, 13 March 2020 10:05 AM UTC
  2. PowerBuilder
  3. # 2

Hi Marc,

Seems to me that your data in BASE returns more than one row for each item in MOVE.

If all rows from BASE for a item in MOVE have the same value you want in yur report you may use DISTINCT.

If not think about what row you want to retrieve from BASE and change the join.

HTH,

René

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.