Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Need to get particular date date from PROD to Dev tables Expand / Collapse
Author
Message
Posted Monday, October 15, 2012 3:02 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, September 17, 2013 2:07 PM
Points: 171, Visits: 556
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
Post #1372955
Posted Monday, October 15, 2012 4:10 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 2:24 PM
Points: 11,990, Visits: 11,007
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 Moden's 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)
Post #1372981
Posted Tuesday, October 16, 2012 12:35 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 3:10 AM
Points: 199, Visits: 500
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.
Post #1373051
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse