Datetime and Timestamp

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Datetime and Timestamp

Post by snassimr »

Hi !

I use datetime type in SQL Server and in DS it defined as timestamp.
When i bring char that I used eirlier for smalldate time I get warning :

results of SQLColAttributes(CustBrthdate) gave MetaData mismatch
COLUMN.TYPE Expected = Timestamp Actual = Char

Any ideas ?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

I think smalldatetime is the datetime within a restricted period.

You need to supply the default timestamp format.

Check whether the column is a timestamp and also whether you are doing a cast in it.
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post by snassimr »

How I can to do cast ?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You need not do a 'cast'. You can do a select with the datatype in datastage being timestamp.

But can you confirm that the column you try to select is a timestamp.
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post by snassimr »

Yes . I see in DS that the column defined as Timestamp (Length - 23 , Scale 3) .

I build the Timestamp in format yyyy/mm/dd hh:nn:ss but it still doesnt work. I see that DS doesnt conveert it before entering it to target table as it happens with smalldatetime case
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You need a '.000' in the end for milli-seconds.
Post Reply