Forum Replies Created

Viewing 15 posts - 1,126 through 1,140 (of 3,008 total)

  • RE: Calculate number of moths between two days?

    select

    DT1,

    DT2,

    MonthDiff =

    datediff(mm,dateadd(dd,-14,a.DT1),dateadd(dd,-14,b.DT2))

    from

    ( -- Test Data

    select DT1=convert(datetime,'20100214')union all

    select DT1=convert(datetime,'20100215')

    ) a

    cross join

    ( -- Test Data

    select DT2=convert(datetime,'20101114')union all

    select DT2=convert(datetime,'20101115')

    ) b

    order by

    DT1,

    DT2

    Results:

    DT1 ...

  • RE: UNC backups

    Geoff A (11/2/2010)


    they do not say NOT to do it, but rather say use caution;

    http://support.microsoft.com/kb/304261

    That link is about locating database files, not backups, on a share or NAS.

    We backup several...

  • RE: Date Puzzle

    timothy bates (11/2/2010)


    Accurate question. I think any question that uses a date with obvious notation to remove all ambiguity such as '2010-Jan-01' is fine. We clearly understand which...

  • RE: rounding error?

    For best accuracy, it is usually better to have all multiplication before all division operations in any language.

    select

    round(

    ( 100.00 * (CAST(b.MonthPop AS decimal(10, 2))-CAST(a.MonthPop AS decimal(10, 2)) ) )

    /

    CAST(a.MonthPop...

  • RE: Maintennce Job step to shrink the transaction log on every db ~ dynamic SQL

    Why not just set the databases to simple recovery mode, and leave them like that?

  • RE: Sr level interview questions

    You come to work in the morning to find that all the disks in the SAN cabinet were destroyed by a direct lightning hit and none of the databases are...

  • RE: Date Dimension Hierarchy Question

    Events may have more dimension attributes than just time and they might have multiple date ranges involved. For example, a book signing might be in store 1 on Jan...

  • RE: Database Diagram printing problems

    Did you set the database diagram to preview the page breaks so that you could see if they overlay page breaks? (Right-click on the back ground and click view...

  • RE: Current date without the timestamp

    If you are using DATETIME, these are better ways to get today at 00:00:00.000. The nested DATEADD and DATEDIFF are a more efficient way to do this conversion...

  • RE: Finding the CORRECT SP1 Download for 2008 Standard R2

    John Bates-251278 (10/29/2010)


    Thanks Gsquared and Gsquared!

    This is what I have: Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)

    No SPs out yet for R2 - you...

  • RE: grow a table's reserved space?

    As I said before:

    SQL Server tables do not have reserved space.

  • RE: BAK File Pieces

    If the backup was done to multiple files, you have to restore from all of them together.

    If the backup was do to a single file and split into multiple files...

  • RE: I need to provide sort option on the first two positions of a field(

    order by left(MyColumn,2)

  • RE: grow a table's reserved space?

    SQL Server tables do not have reserved space.

    SQL Server will allocate pages as needed from free space in the files that the tables is in.

  • RE: Cheap Fun

    Ray K (10/28/2010)


    Michael Valentine Jones (10/26/2010)


    Ray K (10/26/2010)


    Michael Valentine Jones (10/26/2010)


    4. At halftime of the football game, we walked over and watched the soccer team's game on the next field.

    Speaking...

Viewing 15 posts - 1,126 through 1,140 (of 3,008 total)