Forum Replies Created

Viewing 15 posts - 4,336 through 4,350 (of 5,109 total)

  • RE: Query help for getting Hierarchy data

    drew.allen - Tuesday, January 31, 2017 2:23 PM

    Your main problem is that you don't really have a hierarchy here.  Hierarchies are usually...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Query help for getting Hierarchy data

    Does your hierarchy ever go more than 1 level? Your sample doesn't suggest so, so I haven't done more:
    WITH CTE AS(
      SELECT *,
        LEFT(TS.HLabel,...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Calculating Dates

    Is that your solution or? You haven't given us DDL and DLM, as Joe suggested, so the above query doesn't help us.We don't have access to your data, so running...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Are the posted questions getting worse?

    Ray K - Tuesday, January 31, 2017 9:41 AM

    Wow, it's quiet here...

    Clearly the questions being asked have gone up in calibre and...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: How to find PRIOR line of service? Help plz!

    Using Lowell's as a start maybe:
    ;WITH MySampleTable([ID],[FIRST_NAME],[LAST_NAME],[START DATE],[END DATE],[status],[comment])
    AS
    (
    SELECT '1234567','JANE','DOE','2016-09-06','2017-01-31','TERMINATED','for this line' UNION ALL
    SELECT '1234567','JANE','DOE','2015-09-22','2016-09-05','ACTIVE','I''d like to get this line and display both' UNION ALL

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: How to find PRIOR line of service? Help plz!

    Could you provide what your output is meant to look like. I don't really understand what you mean by "for this line". For this line you want to do what...??...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: EXECUTE AS and REVERT

    The context of the whole SP will be run as WindowsUsers1 when declaring WITH EXECUTE As. Thus there are no impersonations to REVERT.

    Try this:
    CREATE PROCEDURE...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: SELECT timestamp in 20 second intervals

    How about:
    SELECT COUNT(T.UID),
           DATEADD(second, CASE WHEN DATEPART(second,T.datetimestamp) < 20 THEN 0
                                WHEN DATEPART(second,T.datetimestamp) >=...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Where criteria not met, return a distinct blank row

    Stab in the dark, what happens if you move your DimStaff.ResourceType = '2' to your JOIN statement?

    Is not, are you able to provide some DDL and DLM (check...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Where criteria not met, return a distinct blank row

    Instead of declaring a list of tables, use JOINS. Your SQL is malformed, and doesn't include the whole picture, so here's a starting block
    SELECT C.CustomerId,
        ...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Using Expressions As Row Groups

    How does your SQL Server spec compared to the development PC your using? I imagine that it's probably got a lot less applications open (no email, web browser, SSMS, etc)...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Sending out an email when SSIS package fails upon validation/communication error

    Where have you got your OnError event, is it for the whole package? If so, then the event will trigger. Do you, perhaps, have some items (like your connection managers)...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Question

    Andrew P - Monday, January 30, 2017 11:48 AM

    ajkarora - Monday, January 30, 2017 11:07 AM

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Code pasting still not 100%

    Behaviour definitely seems to differ on browser, as I don't get the problem Jeff has (extra lines) in Firefox 51.0.1 (64Bit). If I copy the text I put above...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Code pasting still not 100%

    Steve Jones - SSC Editor - Monday, January 30, 2017 8:54 AM

    Tabs or space in source?

    Spaces.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

Viewing 15 posts - 4,336 through 4,350 (of 5,109 total)