OLEDB look up condition

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
raj_cipher
Participant
Posts: 90
Joined: Mon Dec 08, 2003 4:48 am
Location: Chennai

OLEDB look up condition

Post by raj_cipher »

Hi ,

I hv a problem with a OLEDB(for SQL server) Look up.

I look up a table based on a date field.That input field is define as a char of 10.The look up table has the date as timestamp format.When i try looking up it says

Value treated as NULL
Attempt to convert String value "2003-09-15" to Timestamp type unsuccessful

The same thing works well with ODBC.Wat is the Pblm.How can i resolve it ?
Think Ahead,
Raj.D
mleroux
Participant
Posts: 81
Joined: Wed Jul 14, 2004 3:18 am
Location: Johannesburg, South Africa
Contact:

Post by mleroux »

In the lookup condition, try:

Code: Select all

DateField : " 00:00:00.000"
where DateField is your 10 character date field. This way it will look up in proper timestamp format, e.g. "2003-09-15 00:00:00.000" and not just "2003-09-15"
Morney le Roux

There are only 10 kinds of people: Those who understand binary and those who don't.
raj_cipher
Participant
Posts: 90
Joined: Mon Dec 08, 2003 4:48 am
Location: Chennai

Post by raj_cipher »

Hi ,

This didn't help me.
I am still getting the same error msg.
Looks like a pblm in converting my ip field.My ip field is a char of 10.
My concern if this is going fine in ODBC why not in OLEDB
Think Ahead,
Raj.D
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Try to bring in the DateTime filed as String and while writing it to the target convert it to the right format.

Rasi
Post Reply