Page 1 of 1

Lookup Stage

Posted: Thu Nov 09, 2006 1:52 pm
by Raftsman
I am trying to perform a lookup on a table and all records are being rejected
The two keys that I am joining are

TypeA Char (30)
TypeB VarChar(20)

I changed the types so that they would be the same type and length and still they are all rejected. Can someone please tell me what I am doing wrong.

Thanks

Posted: Thu Nov 09, 2006 2:00 pm
by Krazykoolrohit
Try trimming the data before lookup. trim them for any spaces

Posted: Thu Nov 09, 2006 2:04 pm
by DSguru2B
Its pretty obvious that column TypeA is of length 30 and type char. That means if you have "Alpha" as a value in TypeA, it will still have length of 30, whereas if you have the value "Alpha" in a colum varchar of length 30, its length will only be 5.
Krazykoolrohit is right, trim the inputs and change the char to varchar.

Posted: Thu Nov 09, 2006 5:58 pm
by ray.wurlod
If you trim a Char datatype in a parallel job, the result is immediately padded with the character specified in APT_STRING_PADCHAR. You will therefore also need to convert both columns (only temporarily if necessary) to VarChar.

Posted: Fri Nov 10, 2006 12:20 am
by tagnihotri
APT_STRING_PADCHAR, trim sometimes don't actually trim the collumns which are padded with funny characters (depending on the default value of the env variable). So better check the collumn data, which may not be actually same (i.e may be padded with these funny values) !!

Posted: Fri Nov 10, 2006 9:54 am
by Raftsman
I used the modify to convert the CHAR to VARCHAR. Is there a performance difference between the MODIFY and TRANSFORMER stage? Which is better to use?

Thanks

Posted: Fri Nov 10, 2006 10:03 am
by Krazykoolrohit
You dont need to specify anything for conversion between char and varchar. Or am i in the server frame of mind?

Its been time since i touched the parallel pallete.

Lookup Stage - Multiple Keys

Posted: Fri Nov 10, 2006 10:47 am
by Raftsman
Is it possible to user to different key lookups in one lookup stage.

i.e. Field_A.input = B.Code_Table
Field_C.input = B.Code_Table

How do I join multiple fields to one Code table field.

Thanks