Jul 28, 2004 #1 JRO061601 MIS May 30, 2002 92 US Is it possible to do a count distinct of a concatenation of two numeric columns in DB2? Something like this... COUNT(DISTINCT(NUMBER1 CONCAT NUMBER2)) If so, could you provide the syntax? Thanks.
Is it possible to do a count distinct of a concatenation of two numeric columns in DB2? Something like this... COUNT(DISTINCT(NUMBER1 CONCAT NUMBER2)) If so, could you provide the syntax? Thanks.
Jul 29, 2004 1 #2 gregsimpson Programmer Apr 18, 2002 521 JR0061601, I accomplished it as follows with a bit of casting to CHAR. My fields were Integers. SELECT COUNT(DISTINCT(CHAR(NUMBER1)||CHAR(NUMBER2))) FROM YOURDB2TABLE; Cheers Greg Upvote 0 Downvote
JR0061601, I accomplished it as follows with a bit of casting to CHAR. My fields were Integers. SELECT COUNT(DISTINCT(CHAR(NUMBER1)||CHAR(NUMBER2))) FROM YOURDB2TABLE; Cheers Greg
Jul 30, 2004 #4 stevexff Programmer Mar 4, 2004 2,110 GB Worth a star as far as I can see... Upvote 0 Downvote