Forum Replies Created

Viewing 15 posts - 616 through 630 (of 1,241 total)

  • RE: Date Function

    SumonB (1/25/2016)


    Okay here is the scenario.

    I am creating a DBA Report where I need to show the backup details for last 15 days including today's date.

    I have 2 variables...

    ----------------------------------------------------

  • RE: Date Function

    Sergiy (1/23/2016)


    I think he was not totally understanding date math in sql server. Once he defined the problem better Scott was able to give him a solution. I was...

    ----------------------------------------------------

  • RE: Date Function

    Sergiy (1/20/2016)


    SumonB (1/20/2016)


    This is used because if Current Date is less than 7th of the month, it should go to previous month to set the start date

    OK, this is opposite...

    ----------------------------------------------------

  • RE: Date Function

    Since this is a SS2K8 T-SQL forum,

    A cleaner approach:

    Declare @StartDate Date;

    Declare @EndDate Date='2016-01-05';--getdate();

    Set@StartDate = dateadd(d,-15, @EndDate);

    Select@startDate, @endDate;

    Just changing variable types from datetime to Date declaration

    ----------------------------------------------------

  • RE: Flag Values Based on Columns

    Sometimes it's better to say so than to offer any code help.

    He may be after picking some random rows on the intermediate result of a union alls for whatever reason....

    ----------------------------------------------------

  • RE: Flag Values Based on Columns

    Sergiy (1/21/2016)


    MMartin1 (1/21/2016)


    That would make sense since this table is a heap. The ID column is not really an identifyer in this situation. We are not recommending a practice of...

    ----------------------------------------------------

  • RE: Retrieve specific cell value from Excel into SSIS variable

    Phil Parkin (1/21/2016)


    MMartin1 (1/21/2016)


    Brilliant work Orlando. It makes sense that the execute sql task is returning the results of a SELECT. That will be in the form of a ...

    ----------------------------------------------------

  • RE: What is recursion?

    Chris Wooding (1/21/2016)


    To answer the original question; this

    http://www.sqlservercentral.com/Forums/Topic1752249-1292-1.aspx

    is recursion.

    I would also call that an infinite loop. A Recursive function should have a cut off point. 😛

    ----------------------------------------------------

  • RE: Retrieve specific cell value from Excel into SSIS variable

    Brilliant work Orlando. It makes sense that the execute sql task is returning the results of a SELECT. That will be in the form of a result set, even...

    ----------------------------------------------------

  • RE: Flag Values Based on Columns

    That would make sense since this table is a heap. The ID column is not really an identifyer in this situation. We are not recommending a practice of not maintaining...

    ----------------------------------------------------

  • RE: 2 emails being send from sql job when only 1 should send.

    rakesh.naik (12/31/2015)


    I then checked the mail log and see this following error message showing up.

    The mail could not be sent to the recipients because of the mail server...

    ----------------------------------------------------

  • RE: How can I recursive check sp_refreshsqlmodule in sql server?

    Another thing to consider is avoiding the chaining of views if possible. You keep the compiler from getting a good query plan. Things are not as re-usable in the SQL...

    ----------------------------------------------------

  • RE: How can I recursive check sp_refreshsqlmodule in sql server?

    How would you know in the real world that [dbo].[L2] was the first view in the chain, where you started the refresh? Certainly things are not named this way...

    ----------------------------------------------------

  • RE: Flag Values Based on Columns

    Great solution Eirikur , the

    ,ROW_NUMBER() OVER

    (

    ...

    ----------------------------------------------------

  • RE: Tempdb on RamDisks or SSDs - two-node cluster?

    If you have someone good at it, finding the bad code and fixing it isn't as expensive as most would think and has the long term benefit of being rather...

    ----------------------------------------------------

Viewing 15 posts - 616 through 630 (of 1,241 total)