Viewing 13 posts - 16 through 28 (of 28 total)
SELECT TOP(2) * FROM TABLE_1
WHERE LOGDATE<(SELECT MAX(LOGDATE) FROM TABLE_1)
ORDER BY LOGDATE DESC
Returns
('563', '-1','1','2021-02-13'),
('577', '-1','1','2021-02-12'),
February 24, 2022 at 2:22 pm
I am not sure I understand your question. First the log dates look like they are all '2021-02-14'.
SELECT TOP(2) * FROM TABLE_1 WHERE LOGDATE<(SELECT MAX(LOGDATE) FROM TABLE_1)
Since all your Log...
February 24, 2022 at 2:00 pm
I got this to work here is my final solution.
XML Document
<Stats>
<History>
<oh>
<FileType>Unmatched Future Mail Dates (Mailed Early?) </FileType>
<Mail_Date>2021-12-27</Mail_Date>
<Job_Num>1A22 </Job_Num>
<Mail_Cat>T</Mail_Cat>
<Mail_Class>3</Mail_Class>
<Total>5</Total>
<Mail_Date>2021-12-27</Mail_Date>
<Job_Num>P102 </Job_Num>
<Mail_Cat>T</Mail_Cat>
<Mail_Class>3</Mail_Class>
<Total>2</Total>
<Mail_Date>2022-01-07</Mail_Date>
<Job_Num>0107 </Job_Num>
<Mail_Cat>C</Mail_Cat>
<Mail_Class>3</Mail_Class>
<Total>1</Total>
<Mail_Date>2022-01-28</Mail_Date>
<Job_Num>P896 </Job_Num>
<Mail_Cat>P</Mail_Cat>
<Mail_Class>3</Mail_Class>
<Total>7</Total>
</oh>
<oh>
<FileType>Unmatched Past Mail Dates (Missing History?) </FileType>
<Mail_Date>2021-11-12</Mail_Date>
<Job_Num>1Q22...
January 21, 2022 at 11:47 pm
Thank you for your help I made the changes and it works now.
January 21, 2022 at 11:31 pm
Yes, Use a execute SQL task to count the records Imported. Set a Flag to indicate if the count was 0.
IF EXISTS (SELECT 1 FROM [dbo].[Table] )
...
May 5, 2021 at 4:35 pm
Sorry it took so long to get back, weekend, Monday. All of my file name are formatted the same 2Q11_20210423_RRD_CT1_FILE. I do a Split on the file name inside a...
April 19, 2021 at 4:17 pm
I do this all the time, we input files that have the date in the file name. I use a for each loop on the Control Flow and retrieve the...
April 16, 2021 at 2:55 pm
Moderator please delete, there is no issue the fields that are not rendered are detail lines. They show up when the user expands the header.
May 17, 2018 at 8:28 am
One problem with my solution is if it runs everyday. It will send a email everyday until the invoice is loaded. So if it takes three days everyone will be emailing me everyday asking...
July 26, 2017 at 3:21 pm
The query didn't work TSQL didn't like the DATEFROMPARS. I think see what you are going for there. That gives me an idea. This is probably not the easiest way but,...
July 26, 2017 at 3:04 pm
Sorry I need to figure out the logic, "How do I determine if it is the 7th day after the billing cycle and we have not loaded a invoice file." 7...
July 26, 2017 at 1:13 pm
Here is what I do, use a Execute Process Task
July 26, 2017 at 12:33 pm
I deal with a lot of large data tables and have found this article by Aaron Bertrand one of the best I have seen. It shows the research and results...
September 30, 2016 at 8:19 am
Viewing 13 posts - 16 through 28 (of 28 total)