Values getting NULLed
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 101
- Joined: Mon Aug 13, 2007 2:32 am
Values getting NULLed
Hi,
In a simple one to one load job where I am loading from sequential file to DB, the records are getting NULL and I am getting error:
SQL Server]Violation of PRIMARY KEY constraint
Cannot insert duplicate key in object
Help please.
Regards,
Arnab.
In a simple one to one load job where I am loading from sequential file to DB, the records are getting NULL and I am getting error:
SQL Server]Violation of PRIMARY KEY constraint
Cannot insert duplicate key in object
Help please.
Regards,
Arnab.
Re: Values getting NULLed
It was clear in the error that you are violating the Primary KEY constraint,arnie_nits wrote: SQL Server]Violation of PRIMARY KEY constraint
Cannot insert duplicate key in object
Prefer to remove the duplicate in the key column and try to run the job
RAJ
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Re: Values getting NULLed
Can you rephrase what it means ? Does the value turn into NULL and hence the error ?arnie_nits wrote: the records are getting NULL
-
- Participant
- Posts: 101
- Joined: Mon Aug 13, 2007 2:32 am
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
I don't see how anyone could help from the extremely limited information you've posted. If you're certain your key values are "getting NULLed", have you verified where that is happening? Are they being sent to the DB fine and something happens there? Are they lost 'in job' somewhere and sent to the DB as a null? All we can do is guess, you're the only one that can check. Have you tried running through the debugger, step-wise?
If you still need help with this, post the gory details of your job design, then perhaps we can get some idea where this might be happening.
If you still need help with this, post the gory details of your job design, then perhaps we can get some idea where this might be happening.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 43
- Joined: Thu May 29, 2008 8:41 pm
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Re: Values getting NULLed
The first thing that comes to mind is that when you read a sequential file, an empty string value is (by default) read in to DataStage as @NULL, so if one of your key values is an empty string (which would be odd...) then you will be writing NULL instead. You can specify an alternate representation of NULL values in a Sequential File, but I've never messed with that.arnie_nits wrote:In a simple one to one load job where I am loading from sequential file to DB, the records are getting NULL and I am getting error:
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: