Viewing 15 posts - 136 through 150 (of 3,396 total)
Oh, like that! I was going to say this question reminded me of the "Which pilots can fly all the planes in the hangar?" question from SQL for Smarties (I...
March 14, 2023 at 2:48 am
CREATE TABLE and INSERT scripts?
Wouldn't you have to "explode" the kits so that they return their component parts and union that with the non-kit records, and finally sum that? Or...
March 12, 2023 at 5:20 pm
I'd think this is such a bread and butter kind of thing that HR has to do that someone has already written an application that does this. And since they...
February 24, 2023 at 6:06 pm
0 PRECEDING?
isn't that CURRENT ROW? Doesn't matter to me, but if you can write the query in a standard way, it's easier for people to understand what your code is...
February 23, 2023 at 5:17 pm
Maybe I'm just not seeing it. Are you just trying to create a running total?
You need a windowing function to do that...
SELECT trID,
DiffAmt,
rt = SUM(DiffAmt) OVER (ORDER...
February 23, 2023 at 12:39 am
Could you move a little? I can't see the actual stored procedure.
No, really. Post the code for it. Or did you intend for a game of pin the tail on...
February 20, 2023 at 6:16 am
If you created a running total of hours using a windowing function, then you should be able to tell when an employee is into overtime hours. So if you had...
February 20, 2023 at 1:55 am
Oh okay. Thanks, Grant. At least it's a place to start!
And no DAX required! =)
February 14, 2023 at 6:47 pm
Oh, super cool!!! I guess I'll look around for tutorials on it. You wouldn't happen to know any, would you? (Check learn.microsoft etc?)
February 14, 2023 at 4:29 pm
Can you use this logic to unpivot that part? (so you get a column for each)
=IIF(Parameters!IncludePTO.Value=1,IIF(Sum(Fields!strCategory.Value="Payrole", CInt(Fields!mnyMTDActual.Value)
+
IIF(SUM(Fields!strCategory.Value="OT",Cint(Fields!mnyMTDActual.Value)
+
IIf(Sum(Fields!strCategory.Value="PTO",CInt(Fields!mnyMTDActual.Value)
,IIF(Sum(Fields!strCategory.Value="Payrole", CInt(Fields!mnyMTDActual.Value)
+
IIF(SUM(Fields!strCategory.Value="OT",Cint(Fields!mnyMTDActual.Value)
February 14, 2023 at 2:17 am
Use something like this in your report:
= IIF(Parameter!IncludePTO = "Yes", [Payroll] + [OT] + [PTO Sales], [Payroll] + [OT])
Or use a CASE statement in your T-SQL code to do it.
February 13, 2023 at 11:59 pm
oh, right. That's the part I was going to try to avoid: SSIS.
Also, I wanted to maybe summarize them first, and then query... basically like if I were querying a...
February 13, 2023 at 10:12 pm
So just follow the instructions for it in an article like this?
Create a Format File (SQL Server) - SQL Server | Microsoft Learn
February 10, 2023 at 8:40 pm
oh god no don't use UNION ALL unless you really need to.
Why not just something like this to get all the records you need from each source?
INSERT INTO tempdb.TableName(col1, col2,...
February 9, 2023 at 9:17 pm
Viewing 15 posts - 136 through 150 (of 3,396 total)