Page 1 of 1

Problem reading generated keys in oracle

Posted: Tue Mar 14, 2006 12:12 pm
by DSguru2B
I am looking up a table with Pk's generated through Oracle NextVal seq ( not done through DS ETL). For some reason the driving data with unique column is not joining with the lkp table also having that unique data.
SRC:
UniqKey
A
B
C

LKP:
PK UniqKey
1 A
2 B
3 C

Posted: Tue Mar 14, 2006 12:23 pm
by kcbland
Verify no trailing spaces exist using TRIM and make sure case sensitivity is handled. Just like SQL, data must be exact matches.

Posted: Tue Mar 14, 2006 12:40 pm
by DSguru2B
I did take care of those.
But I replaced a direct OCI lookup with a Hash, it is giving me the desired results.
So my curiousity still lies, that why was the OCI lookup not availing the purpose.

Posted: Tue Mar 14, 2006 12:42 pm
by kcbland
Don't know, you didn't post the SQL so we can't tell. If your reference lookup was

Code: Select all

SELECT PK FROM REFTABLE WHERE UniqKey=:1
then the issue might be that UniqKey is padded, or :1 contains spaces. If that wasn't your SQL, then please share.

Posted: Wed Mar 15, 2006 3:04 am
by ogmios
Answer is easy, had it already a few times... in Oracle whatever you read within 1 query is the data that existed at the moment the query was started.

Ogmios