Problem in Date From DB2/UDB
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 50
- Joined: Mon Sep 25, 2006 11:18 pm
- Location: Chennai
- Contact:
Problem in Date From DB2/UDB
hi All..
I read records from DB2 using DB2/UDB stage and loaded into Dataset. In this some Date fields are there. When i view the records from DB2\UDB stage i got actual date present in database. But when the same records are viewed in Dataset stage the dates are existing in the previous day's date.
Pls confirm on the solution for the above issue.
Regards
Raguanthan J
I read records from DB2 using DB2/UDB stage and loaded into Dataset. In this some Date fields are there. When i view the records from DB2\UDB stage i got actual date present in database. But when the same records are viewed in Dataset stage the dates are existing in the previous day's date.
Pls confirm on the solution for the above issue.
Regards
Raguanthan J
-
- Participant
- Posts: 83
- Joined: Sat Oct 28, 2006 6:25 am
Re: Problem in Date From DB2/UDB
Can you please elaborate on "But when the same records are viewed in Dataset stage the dates are existing in the previous day's date"
![Question :?:](./images/smilies/icon_question.gif)
ragunathan13 wrote:hi All..
I read records from DB2 using DB2/UDB stage and loaded into Dataset. In this some Date fields are there. When i view the records from DB2\UDB stage i got actual date present in database. But when the same records are viewed in Dataset stage the dates are existing in the previous day's date.
Pls confirm on the solution for the above issue.
Regards
Raguanthan J
-
- Participant
- Posts: 50
- Joined: Mon Sep 25, 2006 11:18 pm
- Location: Chennai
- Contact:
-
- Participant
- Posts: 147
- Joined: Sat Apr 30, 2005 1:23 am
- Location: Bangalore,India
-
- Participant
- Posts: 50
- Joined: Mon Sep 25, 2006 11:18 pm
- Location: Chennai
- Contact:
-
- Participant
- Posts: 147
- Joined: Sat Apr 30, 2005 1:23 am
- Location: Bangalore,India
-
- Participant
- Posts: 83
- Joined: Sat Oct 28, 2006 6:25 am
To be honest, this sounds ghostly! as in if there is no processing from extraction to landing then how come -1 day
Can not think of anything first hand, but if it wud be me I would read the date as varchar or char and try writting it to seq file, just to point where the issue is!
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
Can not think of anything first hand, but if it wud be me I would read the date as varchar or char and try writting it to seq file, just to point where the issue is!
ragunathan13 wrote:hi tagnihotri
Date in Database as 2000-10-12
When i view from DB2/UDB Stage Date is 2000-10-12 only
But after running the job if i view the same record in Dataset the Date is coming like 2000-10-11.
Thanks and Advanced Thanks
Ragunathan J
-
- Participant
- Posts: 50
- Joined: Mon Sep 25, 2006 11:18 pm
- Location: Chennai
- Contact:
-
- Participant
- Posts: 83
- Joined: Sat Oct 28, 2006 6:25 am
As I understand this, if you read the data from the dataset setting date fields as char the values are correct ? If yes then I will say there is no harm to right them as char only, guys please correct me if I am wrong!
ragunathan13 wrote:hi
i looking at correct dataset only Raghavendra..
If i read it as a varchar or Char, it gives a correct date, When i read it as a Date then only this this issue.
-
- Participant
- Posts: 50
- Joined: Mon Sep 25, 2006 11:18 pm
- Location: Chennai
- Contact:
-
- Charter Member
- Posts: 560
- Joined: Wed Jul 13, 2005 5:36 am
- Location: Ohio
-
- Participant
- Posts: 50
- Joined: Mon Sep 25, 2006 11:18 pm
- Location: Chennai
- Contact:
-
- Participant
- Posts: 83
- Joined: Sat Oct 28, 2006 6:25 am
hmmm as you are able to read data well, the possiblity of pre-processing was thin.
ragunathan13 wrote:No, There is no restriction or preprocessing involved with this field. Simply Load the date fiels as 'date' and Read it as 'date'.Krazykoolrohit wrote:can you check at the table level, if there is any restriction or preprocessing involved with this field
Did you check for triggers?
What is the column definition of the date in the table vs. the definition in DataStage?
Are you extracting from the table using a select * or select Col name, or select coalesce(colname,'2000-01-01')
Or anything like that?
How do you specify the date files on the sequential output stage? Do you specify any formats?
Ande
What is the column definition of the date in the table vs. the definition in DataStage?
Are you extracting from the table using a select * or select Col name, or select coalesce(colname,'2000-01-01')
Or anything like that?
How do you specify the date files on the sequential output stage? Do you specify any formats?
Ande
-
- Participant
- Posts: 50
- Joined: Mon Sep 25, 2006 11:18 pm
- Location: Chennai
- Contact:
Hi AndeAndet wrote:Did you check for triggers?
What is the column definition of the date in the table vs. the definition in DataStage?
Are you extracting from the table using a select * or select Col name, or select coalesce(colname,'2000-01-01')
Or anything like that?
How do you specify the date files on the sequential output stage? Do you specify any formats?
Ande
The column definition of the table and dataset both are date(default formet yyyy-om-dd)
From database extract like select col name1, col name 2..
i did't specify any formats(all are defaults)