Forum Replies Created

Viewing 15 posts - 16 through 30 (of 179 total)

  • Reply To: Lots of CTE and dynamic query

    jcelko212 32090 wrote:

    ... Double quotes are used.

    Where?  There are some pairs of single quotes that are needed in the dynamic SQL (which as others point out, might be changed).  But...

  • Reply To: Long SSIS job failed with connection failure

    I don't know how to fix your problem, but maybe this could be a work-around.

    Maybe you can split up the SSIS into more packages, then have the job call each...

  • Reply To: Adding N/A

    I suspect the 3rd parameter solution was what was being suggested in the first option - with the error of "NULL" instead of "LAG" in the answer.  Of course your...

  • Reply To: The Default LAG

    I had to look it up - I don't use LAG very often, and whenever I would use it, I'd have to look it up anyway.  I don't know the...

  • Reply To: Changing the format for a date

    Given that CAST only has one parameter, I chose the CONVERT solution, even though once I tried it I found it doesn't give the desired result.

    As others stated, the first...

  • Reply To: Lockdown Minutes

    I agree.  I should have figured "min" wasn't the correct answer, because MIN is the minimum function.  But if I hadn't had that brain-fart, I'd have selected "m" instead and...

  • Reply To: Compare columns between 2 tables

    Joe, do you never stop to think that maybe what these people are posting are minimal examples to show where they have a question?  Not the full data set in...

    • This reply was modified 3 years, 8 months ago by  GaryV. Reason: typo
  • Reply To: Strange Code

    "Nothing" is not what really happens.  Something happens - a variable is declared.

    If it was really "nothing", then that variable could be declared again.  I doubt that would work.

    So having...

  • Reply To: Script for employees and their monthly man hours

    Your LEFT JOIN works correctly:

    Get everything from Employee table

    And then match it to records in cteHours

    If anything in Employee doesn't match the cte, return NULL for AllHours

    If that's not what...

    • This reply was modified 3 years, 8 months ago by  GaryV.
  • Reply To: Script for employees and their monthly man hours

    Why is emp_id defined as an int, and then in the WHERE clause it looks for character strings?

     

  • Reply To: Need help trying to find MAX Value in column

    What is the data type of "value"?

    It appears from your results that it might be numeric.  But in your first attempt you use

    value ELSE ''

    in the CASE.

    It appears that you...

  • Reply To: Table Alerts

    True.  But given the business specs, it doesn't hardly seem important. The business should also consider the latency between the time the job runs and the time the text is...

  • Reply To: Table Alerts

    The code given with the /15 and *15 integer math is to figure out the 15-minute time period that contains the current time.  As I write this, it is 7:36,...

  • Reply To: The ADF Case

    I had no idea what the answer would be, as I don't use ADF (yet?)

    But I made an optimistic choice, hoping it would be the same syntax as T-SQL.  No...

  • Reply To: Dividing data equally in 4 sessions

    These schemes will fall apart if the data is too skewed.  For example, if for some reason 80% of the card numbers were divisible by 4, one session would be doing...

    • This reply was modified 3 years, 11 months ago by  GaryV.

Viewing 15 posts - 16 through 30 (of 179 total)