dbTalk Databases Forums  

Export data yield different results

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Export data yield different results in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Emma
 
Posts: n/a

Default Export data yield different results - 05-26-2005 , 02:57 PM






I have a DTS package scheduled to export data to a text file daily.
Sometimes, on two consecutive days, the data exported are the same when the
job runs as scheduled. If I run the job manually using the same parameters
(date/time), the data are different. There is no particular pattern to it.
Any ideas how I can trouble shoot this?

Thanks
Emma


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default RE: Export data yield different results - 05-27-2005 , 06:43 AM






OK


The same statement is the same statement right so if I run it and you run it
the results will be the same unless....


You mention dates here.

So what I think may be happening is that the dates are being intrepeted
differently. Depending on the language of the user and the server the same
date may be interpreted differently

04/05/2005

is not the same to a US person and a UK person. To a UK person this is the
4th of May and to the US guy this is the 5th of April.

To get rid of ambiguity can you specify the date in the format YYYYMMDD. so

SELECT ...FROM...WHERE DateCol = '20050405'


Do this with yourself and the scheduled invocation and let us know if the
results are different.

Allan
www.SQLDTS.com


"Emma" wrote:

Quote:
I have a DTS package scheduled to export data to a text file daily.
Sometimes, on two consecutive days, the data exported are the same when the
job runs as scheduled. If I run the job manually using the same parameters
(date/time), the data are different. There is no particular pattern to it.
Any ideas how I can trouble shoot this?

Thanks
Emma


Reply With Quote
  #3  
Old   
Emma
 
Posts: n/a

Default RE: Export data yield different results - 05-27-2005 , 08:04 AM



I am already doing something similar. I may be approaching it the wrong way.
Maybe some additional information will help. I have the following fields
defined in my database and I would like to add the time to the date to
perform a query.
Date_provided datetime
Time_provided varchar(6)
The date is stored as follows: 2005-05-25 00:00:00.000
The time is stored as follows: 163547 (HHMMSS)

Here is the select query that I use:
select * from mr_information where
convert(nvarchar,date_provided,112)+time_provided
between N'20050517143059' and N'20050518143059'
order by date_provided,time_provided DESC

Where the information I want to select is between 2005-05-25 14:30:59 and
2005-05-26 14:30:59. Is this the right way to add tie time to the date?

Thanks
Emma





"Allan Mitchell" wrote:

Quote:
OK


The same statement is the same statement right so if I run it and you run it
the results will be the same unless....


You mention dates here.

So what I think may be happening is that the dates are being intrepeted
differently. Depending on the language of the user and the server the same
date may be interpreted differently

04/05/2005

is not the same to a US person and a UK person. To a UK person this is the
4th of May and to the US guy this is the 5th of April.

To get rid of ambiguity can you specify the date in the format YYYYMMDD. so

SELECT ...FROM...WHERE DateCol = '20050405'


Do this with yourself and the scheduled invocation and let us know if the
results are different.

Allan
www.SQLDTS.com


"Emma" wrote:

I have a DTS package scheduled to export data to a text file daily.
Sometimes, on two consecutive days, the data exported are the same when the
job runs as scheduled. If I run the job manually using the same parameters
(date/time), the data are different. There is no particular pattern to it.
Any ideas how I can trouble shoot this?

Thanks
Emma


Reply With Quote
  #4  
Old   
Emma
 
Posts: n/a

Default RE: Export data yield different results - 05-27-2005 , 08:17 AM



Ops! I used a different date in the between statement in the example. It
should read
between N'20050525143059' and N'20050526143059' instead of
between N'20050517143059' and N'20050518143059'

"Emma" wrote:

Quote:
I am already doing something similar. I may be approaching it the wrong way.
Maybe some additional information will help. I have the following fields
defined in my database and I would like to add the time to the date to
perform a query.
Date_provided datetime
Time_provided varchar(6)
The date is stored as follows: 2005-05-25 00:00:00.000
The time is stored as follows: 163547 (HHMMSS)

Here is the select query that I use:
select * from mr_information where
convert(nvarchar,date_provided,112)+time_provided
between N'20050517143059' and N'20050518143059'
order by date_provided,time_provided DESC

Where the information I want to select is between 2005-05-25 14:30:59 and
2005-05-26 14:30:59. Is this the right way to add tie time to the date?

Thanks
Emma





"Allan Mitchell" wrote:

OK


The same statement is the same statement right so if I run it and you run it
the results will be the same unless....


You mention dates here.

So what I think may be happening is that the dates are being intrepeted
differently. Depending on the language of the user and the server the same
date may be interpreted differently

04/05/2005

is not the same to a US person and a UK person. To a UK person this is the
4th of May and to the US guy this is the 5th of April.

To get rid of ambiguity can you specify the date in the format YYYYMMDD. so

SELECT ...FROM...WHERE DateCol = '20050405'


Do this with yourself and the scheduled invocation and let us know if the
results are different.

Allan
www.SQLDTS.com


"Emma" wrote:

I have a DTS package scheduled to export data to a text file daily.
Sometimes, on two consecutive days, the data exported are the same when the
job runs as scheduled. If I run the job manually using the same parameters
(date/time), the data are different. There is no particular pattern to it.
Any ideas how I can trouble shoot this?

Thanks
Emma


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.