Viewing 15 posts - 61 through 75 (of 395 total)
Is this what is needed to encapsulate the above logic into a TVF? I'm wanting to use a like clause to pass in the variable: ' WHERE [Agent] like '%...
August 18, 2021 at 2:49 pm
After a good night's sleep letting it 'incubate', I can now see where a Table Valued Function encapsulating the logic above is the way to make this versatile and reusable.
August 18, 2021 at 12:36 pm
I thought that was what i was doing in my original code:
DECLARE @period INT = (SELECT period FROM [a2hr].[payroll].[fnGetPrevPeriodYear](GetDate())),
@yearINT = (SELECT year FROM [a2hr].[payroll].[fnGetPrevPeriodYear](GetDate())),
@PRStartDate Date,
@PREndDate Date
I'm quite...
August 17, 2021 at 9:29 pm
If I wanted to do a SELECT on the resulting CTE query results on e.g. "WHERE date = '2021-07-26' where would I place that?
OR if I wanted to add fields...
August 17, 2021 at 8:16 pm
This is exactly the direction I was looking for... thanks!!
August 17, 2021 at 7:54 pm
Really my only goal is to be able to be able to query the results of the code posted and select different fields and values for those fields to narrow...
August 17, 2021 at 7:34 pm
This is a more elegant and more readable solution... thanks!!
August 17, 2021 at 5:44 pm
I found a similar problem on another site that I modified and got to work:
DECLARE @Count2 INT = (SELECT [CallCount]
FROM [a2wh].[dbo].[CallLogCommonCount] Count1
WHERE (2-1) = (
SELECT COUNT(DISTINCT(Count2.[timestamp]))
FROM...
August 13, 2021 at 7:36 pm
Finally got it! this works:
(SELECT Convert (varchar, (SELECT COUNT (*) FROM .[dbo].[Stage_Log] WHERE datestamp = LEFT(CONVERT(varchar, GetDate(), 120), 10))))
August 12, 2021 at 6:03 pm
The query below works fine now isolated, but it is part of an email stored procedure and I'm getting the error from SQL Agent:
08/12/2021 13:11:45,tel_SMS,Error,2,GSO-SSIS-DEV,Ytel_SMS,Send success email,,Executed as user: NT...
August 12, 2021 at 5:06 pm
Never mind the last crisis... fixed... and the Derived Column with just the expression worked perfectly... thanks!
August 12, 2021 at 3:51 pm
Something really went bad in my VS 2017 SSDT. I went into the advanced editor for the derived column and VS closed, I reopened VS 2017 SSDT and now it...
August 12, 2021 at 3:22 pm
Dumb question... I can just run the email step as a result of a successful run of the first step.
August 12, 2021 at 1:58 pm
I too think I feel more comfortable keeping email notification in SQL Server rather than SSIS as I've learned that it is very versatile. The below code actually works for...
August 12, 2021 at 1:34 pm
Thanks... How do I write to a file in C#? I'm really new to C#
August 11, 2021 at 3:26 pm
Viewing 15 posts - 61 through 75 (of 395 total)