Forum Replies Created

Viewing 15 posts - 136 through 150 (of 338 total)

  • RE: Pre 2012 Stored Procedure: Need some DEV advice (COMPUTE BY TO WITH ROLL UP)

    Simply comment the compute part and replace with a SELECT statement

    -- COMPUTE SUM([Total(MB)]), SUM([Unused(MB)]), SUM([Used(MB)]), SUM([Index(MB)]), SUM([Data(MB)])

    SELECT SUM([Total(MB)]), SUM([Unused(MB)]), SUM([Used(MB)]), SUM([Index(MB)]), SUM([Data(MB)]) FROM dbo.##FO

    Would work for all SQL...

  • RE: Interpreting JSON data in SQL Server for Reporting purpose

    I would say simply create a deserializer class in .Net and use it as a CLR obect to query the data through SQL Server.Of course this would come at expense...

  • RE: Trying to find a more simplistic way to execute this complicated Aggregation Query

    You say "..of average revenue by account... " so why are you averaging it based on fiscalyear.

    Sum(revenue)/count(distinct fiscalyear) AvgByAccount

    You could easily replace it with the Average function AVG(revenue) which will...

  • RE: Second Last work day of month

    Since you have posted the question in SQL Server 2012 TSQL category I assume you are using SQL Server 2012.If that's the case then you can simply use the EOMONTH...

  • RE: Ranking value based on row value

    Appreciate the effort Micky.

    It works perfect.

  • RE: SQL Database code comparison

    If you are already using Visual studio you can use GDR functionality that comes up VS 2008/2010 database edition.

  • RE: T-SQL Advice on Update Statement Needed

    Brandie Tarvin (8/2/2012)


    ....

    LEFT OUTER JOIN DimTime dt1

    ON ... (last update date column in staging table)

    LEFT OUTER JOIN DimTime dt2

    ON ... (Another date column in staging table)

    LEFT OUTER JOIN DimTIme dt3

    ON...

  • RE: Witness server location

    Not sure what would that manual intervention be and when in this scenario.

    The only time I have to do any manual intervention in a DB mirroring is when I have...

  • RE: Witness server location

    GilaMonster (7/29/2012)


    Sachin Nandanwar (7/29/2012)


    But if safety is OFF then any problem on the remote data center would not affect the principal as such.

    The OP states that he wants automatic failover....

  • RE: Witness server location

    Lynn Pettis (7/26/2012)


    Just remember, if the witness server is located in the remote data center with the mirror server, and you lose communication between the data centers that the mirror...

  • RE: compression and transactional replication

    Theoretically yes it should work.

    But for some reason if you have to re-run the snapshot agent and re-initialize the subscriber then I believe you will need to reset the compression...

  • RE: temp tables work oddly

    Does this work ?

    ....FROM #ddb_temp_DDB tdb

    where not exists (select 1 from deposits_daily_balance ddb_t

    where ddb_t.num_cue_s =tdb.num_cue_s and ddb_t.val_date_d = @t_date_d and ddb_t.reg_date_d = @t_date_d)

    ...

  • RE: Permissions on Service Account

    Under which account is the sql server service running ?

  • RE: Data Deletion in DB

    shiv-356842 (7/26/2012)


    Hi Team,

    Some data deletion was happend in our Environment.

    Now i m planning to implementing AUDIT of the database & Server level any suggestions

    In various level we have...

  • RE: compression and transactional replication

    First data compression works only with Enterprise edition.So make sure your edition is Enterprise.

    Second compression is a property which does get replicated in replication.So if your table is compressed on...

Viewing 15 posts - 136 through 150 (of 338 total)