how to get only latest record in database view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2022 03:30 AM
Hello
Is there anyway to get latest record in database view. i have created a database view but its showing duplicate records. i need only unique records, is it possible.
- Labels:
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 12:48 AM
Hi Kumar,
I'm struggling to understand where the problem is here or what your'e trying to achieve. The join in its current form to the sys_user table is redundant as the sc_req_item has a requested_for field and handle. I could understand the join if you were need to further query on sys_user attributes such as location or departments for example.
Can you provide an example of a duplicate record where you only wish you list the latest?
Do you have Req Items with duplicate numbers? If thats's the case (big assumption here but I have seen it before), this is a data issue and can't be solved by a database view as whilst the 'number' appears the same, they are in fact different records.
This will however give you the opportunity to correct the data.
Please can you share some of the results?
Please mark as helpful and/or correct in order to help others.
Thanks,
Robbie