Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Repeating names in prompt

Status
Not open for further replies.

sekar211

MIS
Dec 15, 2003
55
0
0
US
I have an attribute "Username" with Id and Desc forms.when i use prompt for this username,same names are repeated multiple times.
can any one please give an idea how i can restrict this to display the names only once.

Thank You
 
It sounds like your ID is not unique in the table.

If that is the case then you either need to create a lookup table for username giving it a unique ID. Then put that new ID on the other table. A second solution is to create the ID as its own attrib and create the username as its own atrrib with a child of ID.

The first solution is cleaner though.

Hope this helps
 
i don't have access to the database and hence i can't create any lookup table now.so i will try the second solution,but can you describe it in more detail how that can work in this case?

Thank you
 
you will probably need to create 2 attributes but this is dependant on your schema.

The first attribute will be the ID attribute. It will only have an ID form. No Description is necessary. I am assuming that this is a key for the table. You may not need this.

The second is the UserName attribute. You only need to set the username as and ID. You do not need a description for the attribute. It will give you a warning message but its ok. You should add the ID attribute as a child of username(the first one you created).

and that should do it.


 
the problem here is userid is not the primary key in the table.the id and names are included in the fact table itself.i think the only way to overcome is to create a view with Id and names.any how for time being i have added the names manually into the prompt.
in case if you come across any other solution please let me know.

Thank you
 
You shouldn't need to do anything special for this... The behavior you want is MSTR default.

When attribute elements are retrieved, MSTR should use SELECT DISTINCT. This is in a VLDB setting, so check this. By default, this should be on.

You don't need to create any additional schema objects or logical database objects.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top