debajit (1/4/2014)
Hi Kapil,Please find sample data.
File_List
File_ID File_Status Customer_NameDirectionFirst_DirectoryOriginal_FileName
1 Active P&G I \\XYZ MonthlyReport
2 Passive Dabur I \\XYZ WeeklyReport
3 Active Nirma O \\abc DailyReport
File_Dest
File_Dest_ID File_ID Final_DirectoryOutput_FileNameDelivery_Type
1 1\\GHI MonthlyReport FTP
2 3\\KLM WeeklyReport FTP
3 1\\GHI DailyReportSFTP
File_Schedule
File_Sche_ID File_ID Start_Date First_Notify Second_Notify Due_Day Schedule_Type
1 112/30/13 0:00 Y N Last MondayEvery 28 Days
2 112/30/13 0:00 Y Y Last Day-1Day(s) EachMonth
3 312/30/13 0:00 N N Thursday
Weekly
Thanks,
Debajit
I believe he was suggesting that you post your DDL and sample data in consumable form:
Forum Etiquette: How to post data/code on a forum to get the best help [/url]
My thought question: Have you ever been told that your query runs too fast?
My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
Since random numbers are too important to be left to chance, let's generate some![/url]
Learn to understand recursive CTEs by example.[/url]
[url url=http://www.sqlservercentral.com/articles/St