Page 1 of 1

Key function

Posted: Mon Apr 05, 2004 9:23 am
by Peytot
Hi,

I need to do a lookup between a file and a Hash File on more fileds (6). If I use the standard technique, It's very long.
I know (but I don't remember) that DataStage have a function where I can concatenate all these fields in a new field (for my two files) and after in the transform, The lookup is faster.

Is anybody know this command?

Thank you for your help.

Pey

Posted: Mon Apr 05, 2004 12:45 pm
by chulett
Not sure, but is the technique discussed in this post what you are thinking of? Or something you could use?

If you mean simply concatenating all of those fields together to build a 'psuedo' composite key, just use the standard colon concatenation operator. Throw in the NullToSpace() transform to handle any null fields that might exist. Or is this the standard technique that is 'very long' you mentioned? I wasn't sure if 'long' meant big in size or in execution time...

Posted: Mon Apr 05, 2004 3:32 pm
by kduke
Hash files are very fast even with compound keys. All DataStage does is put a @TM between each key field so it is pretty much a concatenated field. @TM is a char(251).