Problem reading generated keys in oracle

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Problem reading generated keys in oracle

Post 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
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Verify no trailing spaces exist using TRIM and make sure case sensitivity is handled. Just like SQL, data must be exact matches.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post 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.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Post 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
In theory there's no difference between theory and practice. In practice there is.
Post Reply