Re: Import Data question using DTS
From: fniles (fniles_at_pfmail.com)
Date: 03/01/05
- Next message: kevinsharp69: "Re: sqlmaint Question"
- Previous message: Dan D.: "RE: reading sql server error logs"
- In reply to: J Hunter: "Re: Import Data question using DTS"
- Next in thread: J Hunter: "Re: Import Data question using DTS"
- Reply: J Hunter: "Re: Import Data question using DTS"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Mar 2005 12:18:23 -0600
Thanks for the reply.
>If you run your query directly against database a on server 1, are the rows
>returned?
Yes, rows are returned when I run the query "select * from tableA where
tableA.[DateRecorded]='02/28/05'" against database A on server 1.
"J Hunter" <ms-nntp-nospam@jshunter.co.uk> wrote in message
news:%23B2ZnfoHFHA.3628@TK2MSFTNGP15.phx.gbl...
> Hi,
>
> If you run your query directly against database a on server 1, are the
> rows
> returned?
>
> It might be a issue with string to date convertion. Try using the format
> '20050228' or explicitly
> convert the string to a datetime - Convert(datetime, '02/28/05', 1).
>
> If there is a time component (ie not 00:00:00) you would need to discard
> that before doing the comparison.
>
> Or try: DateRecorded BETWEEN '20050228 00:00:00' AND '20050228 23:59:59'
>
> Cheers
>
> J.
>
>
> "fniles" <fniles@pfmail.com> wrote in message
> news:e4p9JZoHFHA.3196@TK2MSFTNGP15.phx.gbl...
>> I have a database A on 1 server and database A on the 2nd machine.
>> I would like to export data from tableA database A from the 1 server to
> the
>> 2nd machine, but I only want to export data whose date = '02/28/05'.
>>
>> When I export the data using DTS, I specify that I would like to "use
> query
>> to specify the data to transfer", and I wrote the query as the following:
>> select * from tableA where tableA.[DateRecorded]='02/28/05' and run it.
>> It
>> said that it successfully export the data.
>> But when I went to the 2nd machine database A table A, I do not see the
> data
>> where [DateRecorded]='02/28/05'.
>>
>> How can I export data only where [DateRecorded]='02/28/05' ?
>>
>> Thank you very much.
>>
>>
>
>
- Next message: kevinsharp69: "Re: sqlmaint Question"
- Previous message: Dan D.: "RE: reading sql server error logs"
- In reply to: J Hunter: "Re: Import Data question using DTS"
- Next in thread: J Hunter: "Re: Import Data question using DTS"
- Reply: J Hunter: "Re: Import Data question using DTS"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|