SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Need to get particular date date from PROD to Dev tables


Need to get particular date date from PROD to Dev tables

Author
Message
komal145
komal145
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2093 Visits: 1205
Hi friends,
I Need to get particular date(eg: todays date) date from PROD to Dev tables.where the tables already exist in both enviornments with some data.

I created ( OLEDB source and destination ) , but need only todays data. How to do taht.

can any one help me with this plz!!!

Thanks,
Komal
Sean Lange
Sean Lange
SSC Guru
SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)

Group: General Forum Members
Points: 66038 Visits: 17980
komal145 (10/15/2012)
Hi friends,
I Need to get particular date(eg: todays date) date from PROD to Dev tables.where the tables already exist in both enviornments with some data.

I created ( OLEDB source and destination ) , but need only todays data. How to do taht.

can any one help me with this plz!!!

Thanks,
Komal


You didn't provide any details so I can't provide a detailed response.

You need to use date logic in your query. Where some field > somedate and some field <= somedate or something along those lines. If you don't have datetime columns in your table you are facing the impossible.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
sqlusers
sqlusers
SSChasing Mays
SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)SSChasing Mays (607 reputation)

Group: General Forum Members
Points: 607 Visits: 512
One more way!

1. Get Today date from Script Task and store it in an variable.
Now.AddDays(0).Date.ToString("MM/dd/yyyy")



2. Pass that variable in your DB Source along with your condition.

SELECT <Column Name>
FROM TableName
WHERE .... =/> <Variable Name>

. Use your convert function to convert as per req.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search