Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Puzzles on SQL/Oracle
Charles Hooper wrote:
> DA Morgan wrote:
>>> What I was looking for when I started building the second example was a >>> way to retrieve the binary values of all columns in a row (ragardless >>> of the column names), pass the binary values through DBMS_CRYPTO.HASH >>> to generate a hash key, and then use that to see if two rows resolved >>> to exactly the same hash key. I didn't find the function that I was >>> searching for to pull the binary values of all columns. Something like >>> this, but without listing each of the columns: >>> SELECT >>> NVL(A.COL1,B.COL1) COL1, >>> NVL(A.COL2,B.COL2) COL2, >>> NVL(A.COL3,B.COL3) COL3, >>> NVL2(A.COL1,'TABLE A','TABLE B') FROM_TABLE >>> FROM >>> TABLE_A A >>> FULL OUTER JOIN >>> TABLE_B B ON A.COL1=B.COL1 AND A.COL2=B.COL2 AND A.COL3=B.COL3 >>> WHERE >>> >>> DUMP(A.COL1||'^'||A.COL2||'^'||A.COL3)<>DUMP(B.COL1||'^'||B.COL2||'^'||B.COL3); >>> >>> Charles Hooper >>> PC Support Specialist >>> K&M Machine-Fabricating, Inc. >> I personally like the question because, as I stated before, it allows >> the interviewer to really get a sense of someone's skills as well as >> how they approach a problem. >> >> Other approaches I've seen include an INTERSECT or INNER JOIN and then >> filtering out anything in the intersection. >> -- >> Daniel A. Morgan >> University of Washington >> damorgan_at_x.washington.edu >> (replace x with u to respond) >> Puget Sound Oracle Users Group >> www.psoug.org
Not of which I am aware.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Thu Dec 21 2006 - 19:56:54 CST