single quote vs double quote

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
pratapsriram
Premium Member
Premium Member
Posts: 41
Joined: Tue Jan 24, 2006 3:43 pm
Location: United States
Contact:

single quote vs double quote

Post by pratapsriram »

Is there any difference between a single quote to a double quote when defining a value in parallel job transformer stage?
I am trying to do null handling for a lookup value by assigning it to '-1 ' which has a space character in the string, but the records always get rejected while loading due to the foreign constraint saying it didnt find the parent key. The parent key is a char(3) of value '-1 '. So how to do this in Datastage?
Knowledge is Power
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

I don't think the type of quote matters.

Have you tried dumping the records to the Peek stage, or a Sequential File stage, instead of loading them into a table? Then you can see what's actually in there.

What error message do you get?

How are you handling the nulls? What have you tried?
Choose a job you love, and you will never have to work a day in your life. - Confucius
BugFree
Participant
Posts: 82
Joined: Wed Dec 13, 2006 6:02 am

Post by BugFree »

Hi,

I will make some assumptions before suggesting something.

----I assume that the 'Parent Key' is having referential integrity on the primary key of the same table. So, both fields reside in same table.
----"-1" is the place holder value that you are trying pass incase of NULL\Space.

If my assumptions are right then,
--- You should insert a record where primary key value is "-1" and Parent Key is NULL. This should happen before loading any of the other valid record. I assume that your primary or parent key is integer in nature, you should enclose -1 in double quote or single qoute.
--- Try loading other valid records.

Hope this helps
Ping me if I am wrong...
BugFree
Participant
Posts: 82
Joined: Wed Dec 13, 2006 6:02 am

Post by BugFree »

Hi,

The same logic applies even if Parent key is having referencial integrety on different table.

The point is -1 should be made available in the table before you load actual record.
Ping me if I am wrong...
prakash.dasika
Participant
Posts: 1
Joined: Wed Feb 10, 2010 10:28 pm
Location: Australia

Post by prakash.dasika »

If one value is defined as char(3) then the other corresponding value in lookup should have the same data type. are you sure the value after -1 is a space?, it might be a unprintable character.
Prakash Dasika
Post Reply