Forum Replies Created

Viewing 15 posts - 361 through 375 (of 1,193 total)

  • RE: Stuck on a substitution issue

    Just use CROSS APPLY to introduce the expression, and then you can just give it a name you can reference.

    Here's a quick example illustrating it:

    SELECT object_id,

    ...

  • RE: Alwayson failover issue

    From https://msdn.microsoft.com/en-us/library/ff878601.aspx about ALTER AVAILABILITY GROUP...FAILOVER:

    Initiates a manual failover of the availability group without data loss to the secondary replica to which you are connected[/i].

    (my emphasis)

    The problem is as...

  • RE: Help with matching contacts to organisations

    There are leading tabs in some of the data.

    For example, the [Mailing Address Line 1] that seems to be 'North Middlesex University Hospital NHS Trust' is actually that same...

  • RE: Function call within Insert failing

    milindthakkar (9/22/2016)


    ...

    Now, if the function is returning null or non-integer value, PARSE would have failed.

    ...

    That first part is not true. If the function returns NULL, then PARSE will return...

  • RE: Job failure count mismatch?

    As you note, the first restricts results to step_id=0, while the second restricts results to step_id<>0.

    That's the most likely cause of a discrepancy I can see. A single job...

  • RE: How to avoid this message : 'Database name 'tempdb' ignored, referencing object in tempdb.'

    That would likely be because your drop did not get triggered.

    If you are not executing in the context of tempdb, then scoping the object reference to tempdb is actually...

  • RE: How to avoid this message : 'Database name 'tempdb' ignored, referencing object in tempdb.'

    RVSC48 (9/21/2016)


    I would replace this: INSERT INTO tempdb..#members_roles(RoleName, MemberName)

    with INSERT INTO tempdb..members_roles(RoleName, MemberName) - taking out the # because it is not needed but implicitly implied. Also take...

  • RE: How to avoid this message : 'Database name 'tempdb' ignored, referencing object in tempdb.'

    When referencing a temporary table, there's no need to specify that tempdb is the database.

    You'll get that message anytime you attempt to do so (so all the references to...

  • RE: Date Time Issue

    SQLPain (9/20/2016)


    I would like to see the records from todays date as well.

    Eh? How would you expect that? The filter is for anything less than or equal to the date...

  • RE: Date Time Issue

    If that is the correct logic for your requirements, that should work as well as anything else.

    On that note, if you run the report right now, what is the latest...

  • RE: Date Time Issue

    SQLPain (9/20/2016)


    Thanks Everyone.

    So basically because of the precedence rule the following would end up giving me the same result?

    L.FundingDate <= CONVERT(VARCHAR(10),GETDATE()-30,101)

    L.FundingDate <= GETDATE()-30

    Also would the following give out the...

  • RE: Non-clustered index question

    John Mitchell-245523 (9/20/2016)


    Mike Scalise (9/20/2016)


    Hi John,

    Thanks for the reply. I have a few comments:

    Mike

    No, because if you only have a non-clustered index, your table is a heap.

    I know technically a...

  • RE: Non-clustered index question

    A couple points are worth mentioning.

    1) From a "how it gets used in query plans" perspective, there will be little difference between a clustered index with the key on ID...

  • RE: Date Time Issue

    When you convert both datetime values to varchar, you're doing a string comparison.

    The format you've chosen in the convert function converts the datetime to string in the format 'mm/dd/yyyy'.

    Doing...

  • RE: Are the posted questions getting worse?

    Phil Parkin (9/16/2016)


    Jacob Wilkins (9/16/2016)


    Sean Lange (9/16/2016)


    Eirikur Eiriksson (9/16/2016)


    Sean Lange (9/16/2016)


    Eirikur Eiriksson (9/16/2016)


    ThomasRushton (9/16/2016)


    Thom A (9/16/2016)


    ThomasRushton (9/16/2016)


    Sean Lange (9/16/2016)


    BWFC (9/16/2016)


    jasona.work (9/16/2016)


    Thom A (9/16/2016)


    ThomasRushton (9/16/2016)


    These posts offering ways to get rid...

Viewing 15 posts - 361 through 375 (of 1,193 total)