Data Mismatch using ODBC connector stage
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
Data Mismatch using ODBC connector stage
Hi All
1.I pass a column containing varchar as 31/12/2010
2.Apply a StringToDate function
3.In the Sqlserver database its stored as 31/12/2011
Any idea how to fix this ?
Regards
Sreeni
1.I pass a column containing varchar as 31/12/2010
2.Apply a StringToDate function
3.In the Sqlserver database its stored as 31/12/2011
Any idea how to fix this ?
Regards
Sreeni
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Premium Member
- Posts: 151
- Joined: Fri Feb 13, 2009 4:19 pm
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
-
- Premium Member
- Posts: 151
- Joined: Fri Feb 13, 2009 4:19 pm
No difference between single and double quotes in these stages. But what value is written to a peek stage or sequential file?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
Do other dates get loaded correctly or is there always 1 year difference?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
And if you manually use SQL to do the same insert statement is the error the same?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
I have used SQL Server in Windows PX Platform. Never had such issues with date.
Try creating a dummy table with 2 columns - varchar and datetime.
Pass same value (after typecast) to both and check the result.
Also run an sql insert via SQL Server front-end rather than DataStage to verify the outcome.
Try creating a dummy table with 2 columns - varchar and datetime.
Pass same value (after typecast) to both and check the result.
Also run an sql insert via SQL Server front-end rather than DataStage to verify the outcome.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: