Forum Replies Created

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

  • RE: Using temp tables in stored procedures for data flow source in SSIS 2012?

    In your control flow, how do you know what version of the procedure will be called? Are you using it in a loop container?

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

  • RE: Trying to replace UNION

    SQL006 (1/31/2016)


    Thanks chris, Luis for the solution.

    This is just the scenario i created, In production there is no temporary table #Test only physical table which consists of 2 million data....

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

  • RE: Flag Values Based on Columns

    Jeff Moden (2/1/2016)


    Eirikur Eiriksson (1/27/2016)


    Jeff Moden (1/26/2016)


    I'd take some heart in what was said as mean as it sounded. We have quick posts that don't survive the future and...

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

  • RE: Reason for adding a new SQL Server instance in same machine

    One idea you may see and related to making use of a underutilized server ; is having a the application server and the reporting database on two instances of the...

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

  • RE: SQL Server 2008 - DB troubleshooting - need peer review

    GilaMonster (1/29/2016)


    "(table2.[type]<2 and table2.[type]>2)"

    That will match precisely 0 rows, as type cannot be both less than 2 and greater than 2 at the same time. It's not equivalent to (table2.type...

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

  • RE: SQL Server 2008 - DB troubleshooting - need peer review

    Table2.Type!=2

    Also know that if that column contains nulls, those will be missed by the select. Something along the lines of

    (table2.[type]<2 and table2.[type]>2) Or table2.[type] IS NULL /*...

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

  • RE: Best way to merge two large client databases

    titsiros (1/26/2016)


    The databases are on different machines but for the purpose of the merge we could move them to the same one. This would also make sense in terms of...

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

  • RE: Best way to merge two large client databases

    titsiros (1/26/2016)


    I use a similar strategy but instead of having a nested select, I do an INNER join between the two databases

    insert into destinationDB.destinationTable (ID, s...)

    select destinationParentTable.ID, s...

    from...

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

  • RE: Date Function

    Sergiy (1/25/2016)


    MMartin1 (1/25/2016)


    No, since this particular statement is vague the best we can do is start him off with some basics to try and get more information. This is not...

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

  • 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...

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

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