The description my body. A something>> I've a little problem with a SQL View ... <<
No, your actual problem is with the DDL. You don't know how relational databases work so you got a really bad schema design. You also have no manners because you failed to post the DDL as required.
All we have is three table names; manage is a verb and not a tablename, details doesn't tell us what their details of and finally we have some kind of P. Could you be vaguer?
We have references in RDBMS and not links. Huge difference! A GUID means a "global unique identifier" and it is properly used, to reference objects and data elements external to the current schema. Inside the schema, we have references to the columns of tables. You also don't understand the difference between a row and a record.
>> I've three tables: ...<<
And where is there DDL? I think you and us to design your entire system for you and you won't even show us what you've done. In a commercial database, a details table is usually what is called a weak entity. It exists only because of references to a strong entity. The usual thing is orders and order details, but other models are also common.
>> The point is that Details and Payments could have more than one entry and this means that the record [sic] is replicated many time. <<
Again, a row is not a record. But more important is your misconception about the purpose of databases in general. Even before there was SQL, we were trying to create systems that reduce redundancy. But your increasing redundancy! Boy I sure wish we had that DDL so it seemed exactly how messed up. This is
>> I tried with TOP 1, to restrict the result but there's no way to achieve the goal. <<
The highly proprietary, non-relational TOP(n) syntax is another sign of bad programming, as well as bad language design. RDBMS is supposed to be based on sets and sets have no ordering. If you have an ordering relationship, it should be represented according to Dr. Codd's rules with scalar values in the columns of the rows of a table. Also, the syntax has to have an ORDER BY clause to convert the table into a cursor, which can be ordered.
Also, I been at this for over 30 years, and I've written less than five SELECT DISTINCT clauses in my entire career. They are very rare, if your schema is normalized improperly design. Your other column names are absurdly vague; there is no such thing in the universe is a generic type, a universal date, etc. Please read ISO 11179 naming rules.
Also, why do you think that "Details AS A2" is a helpful alias for someone trying to read your code?
>> The idea is, even there are more values, to show one row per record [sic]? <<
Since we have no idea what your schema looks like, I would make a wild guess that somewhere in here you want to pick something with a MAX() or MIN() test on a row. Somewhere in one of these undefined tables
. Would you like to be polite and try again with the DDL?
Please post DDL and follow ANSI/ISO standards when asking for help.