Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

DB2 UNIQUE pseudo column

Hello

In one of the DB2Input components, the SELECT statement uses a pseudo columns called ‘UNIQUE’

 

"SELECT

  WF.UNIQUE

FROM "+context.BDU_DB2_Schema_BDU+".WATCHFOLDER WF

INNER JOIN "+context.BDU_DB2_Schema_BDU+".WATCHPATTERN P ON WF.ID = P.WATCHFOLDER_ID

WHERE P.ID = "+context.patternID

  

I am trying to find out what this is and so far online search is not yielding anything useful.

 

I am guessing that the ‘unique’ pseudo column retrieves the number of unique rows based on a number of non-unique columns that taken together may constitute a unique value (i.e. composite key), but clearly the above SQL does not suggest that.

 

When I attempt to execute the above SQL using SquirreL connected to DB2 DB, I get 5 rows of zeros.

 0683p000009LslY.jpg

 

Does anyone know what does this UNIQUE column supposed to do ?

 

Appreciate your help

 

Thanks

 

Patrice

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Hi,
Is UNIQUE present when you ask for a desc of the table WATCHFOLDER?
If so this not a pseudo-column.
Else you should get the answer from the DB2 documentation.

View solution in original post

2 Replies
TRF
Champion II
Champion II

Hi,
Is UNIQUE present when you ask for a desc of the table WATCHFOLDER?
If so this not a pseudo-column.
Else you should get the answer from the DB2 documentation.
Anonymous
Not applicable
Author

Thanks. You were absolutely right. I have been a bozo. 'UNIQUE' is actually a column in the table rather then a pseudo column. 

I have been staring at this SQL way to long to notice, the explanation is much simpler.

 

Thanks very much.

Patrice