Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
9 subscribers
Views
2203 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
This is regarding the CDT's. We have a database view and there is no d
narasimhaadityac
A Score Level 2
over 8 years ago
This is regarding the CDT's.
We have a database view and there is no defined identifier column hence we have defined one of the column as primary key while defining CDT. We observed that there are duplicate entries coming up for this column defined as primary key.
When using "Query Rule" the duplicates are eliminated and it is showing only one row
When using "Query Entity" we are been returned with all entries and its not honoring the primary key column.
Any idea on why this difference in behaviors?
OriginalPostID-215718
OriginalPostID-215718
Discussion posts and replies are publicly visible
0
ChristineH
Certified Lead Developer
over 8 years ago
That is as designed.... Depending on what you need to occur, will dictate which to use and maybe even what action to take (i.e. add a "unique" field to the view).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sparshs
over 8 years ago
Use UUID() to create a unique column for the view, it will give you a unique field for each row of view. This function is simple sql function only.
@Christineh: is it like query rule eliminate duplicate values from the returned datasubset?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
satheeshm
over 8 years ago
its unique
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Chris
over 8 years ago
Also with MS SQL you can use a column such as this to define a unique ID on a view:
"SELECT TOP (100) PERCENT ROW_NUMBER() OVER (ORDER BY <any column>) AS Row, ..."
That will create a column 'Row' as a unique value. Only trick from there is your XSD will need to define this column as 'bigint'.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel