Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)

  • RE: Extended event not capturing queries

    Thank you again

  • RE: Extended event not capturing queries

    Thanks GilaMonster, can you also confirm if it will capture variable values? When capturing queries in the QueryData table they seem to start like (@P1 nvarchar(4000), @P2 nvarchar(4000),... And then...

  • RE: Self Join alternative

    I agree it is bizarre but it is the way the script currently works and they do not wish to change it.

  • RE: Self Join alternative

    I would need it to show as below

    12015-07-01 07:00:00.000NULLNULL

    22015-07-01 09:00:00.0002015-07-01 09:30:00.0002015-07-01 10:00:00.000

    32015-07-01 06:00:00.0002015-07-01 06:45:00.000NULL

    42015-07-01 04:00:00.0002015-07-01 05:00:00.0002015-07-01 06:00:00.000

    42015-07-01 04:00:00.0002015-07-01 05:00:00.0002015-07-02 06:00:00.000

    Does anyone have any ideas?

    Thanks

    Sam

  • RE: Self Join alternative

    Thank you all for the suggestion, however If I was to run the following

    INSERT INTO #Data

    VALUES

    (4,'Got Dressed','2015-07-02 06:00:00.000')

    And then run my query, It would show me two entries for PersonID...

  • RE: Help with nested select

    Thanks for all your help. The issue is that it is using a view that pulls from multiple tables and it does bring back some duplicates.

    I am not even sure...

  • RE: Help with nested select

    Hi

    I amended your idea and came up with the following.

    WITH Course

    AS ( SELECT RandomId,

    ...

  • RE: Help with nested select

    I have another similar one if anyone can help.

    CREATE TABLE #Courses (RandomID INT, PersonID INT, CourseTitle NVARCHAR(200), CourseDate DATETIME)

    INSERT INTO #Courses

    VALUES

    (1,1,'Maths','2015-05-01 15:30'),

    (2,1,'Science','2015-05-01 15:30'),

    (3,1,'Science','2015-05-01 15:30'),

    (4,1,'Science','2015-06-01 15:30'),

    (5,1,'Maths','2015-04-01 15:30'),

    (6,2,'Science','2015-05-01 15:30'),

    (7,3,'Science','2015-05-01 15:30'),

    (8,4,'Science','2015-05-01 15:30'),

    (9,5,'Science','2015-05-01 15:30'),

    (10,6,'Science','2015-05-01...

  • RE: Help with nested select

    Hi Phil

    Thanks that worked.

    Sam

  • RE: Failed to initialize sqlcmd library with error number -2147467259

    Hi Kevaburg

    No it does not.

    Sam

  • RE: Bulk Insert more than one CSV file

    Hi COldCoffee

    That code works brilliantly.

    Thanks for all your help!

Viewing 11 posts - 1 through 11 (of 11 total)