Forum Replies Created

Viewing 15 posts - 3,061 through 3,075 (of 8,731 total)

  • RE: find date value from file name

    Would it work with the real creation time of the file by using a script?

    This code is untested, but it could give you an idea.

    Option Strict On

    Imports System

    Imports System.IO

    Imports System.Data

    Imports...

  • RE: Run same query across many system tables

    This is a great place to use a cursor. You need to go table by table to get the desired results.

    Here's an example, just change the query text and you...

  • RE: Set end date for a row to start date of next row minus 1 day

    I know that you're posting on the 2008 forum, but I'll include the 2012 option just in case.

    --SQL Server 2008/2005

    WITH CTE AS(

    SELECT *, ROW_NUMBER() OVER(PARTITION BY...

  • RE: Today's Random Word!

    whereisSQL? (4/12/2016)


    Ed Wagner (4/12/2016)


    BWFC (4/12/2016)


    ThomasRushton (4/12/2016)


    Revenant (4/12/2016)


    ThomasRushton (4/12/2016)


    Manic Star (4/12/2016)


    whereisSQL? (4/12/2016)


    djj (4/12/2016)


    Grumpy DBA (4/12/2016)


    Ed Wagner (4/12/2016)


    San Francisco

    (left my) Heart

    Soul

    Train

    Tracks

    switch

    blade

    glory

    Blaze

    Fire

    Fighter

    Street

  • RE: SQL Server Memory Settings

    Or without subqueries:

    SELECT TOP 1 @@servername AS Servername

    ,[min server memory (MB)] = MAX(CASE WHEN name = 'min server memory (MB)' THEN value END )

    ,[max server memory (MB)] = MAX(CASE WHEN...

  • RE: Not sure what transform to use (how can I?)

    I would suggest to have a unique or primary key constraint in your target table to prevent the insertion of rows 14 and 15. As Phil said, there's no use...

  • RE: Query Execution Plan, differs between environments

    I'd start by updating the statistics in your development server. Those seem very stale.

    Same queries in different environments can generate different execution plans because they have to adapt to the...

  • RE: Today's Random Word!

    EL Jerry (4/11/2016)


    whereisSQL? (4/11/2016)


    crookj (4/11/2016)


    ZZartin (4/11/2016)


    Ed Wagner (4/11/2016)


    Ray K (4/11/2016)


    Revenant (4/11/2016)


    Grumpy DBA (4/11/2016)


    ThomasRushton (4/11/2016)


    Highlander

    Toyota

    Hybrid

    RAV4

    Accord

    Peace

    Necron 99

    Wizards

    Washington

    Apples

  • RE: Quick design question

    A year ago, someone else asked a question about a Movie Rental Database. Could this be the same school assignment?

  • RE: Quick design question

    sys.user (4/11/2016)


    Luis Cazares (4/11/2016)


    Are you sure your model makes a difference between Title/movie and DVDs/copies? Those are different entities.

    Well, since the original database was meant to work with single copies...

  • RE: Quick design question

    Are you sure your model makes a difference between Title/movie and DVDs/copies? Those are different entities.

  • RE: Help with PIVOT

    NineIron (4/11/2016)


    OK. Now for some more knowledge transfer..................this stored procedure containing the dynamic sql is used for an SSRS report. The dataset isn't pulling the fields because of issues with...

  • RE: Help with PIVOT

    yb751 (4/11/2016)


    Pretty cool technique I learnt from Luis. 😉

    You just made my day 🙂

    I learned this concatenation method from Wayne Sheffield, which he explains it in here: http://www.sqlservercentral.com/articles/comma+separated+list/71700/

    And combined it...

  • RE: Create 10,000 12 digit random numbers - starting with the number 7

    This method will allow you to get the 10,000 duplicates. Check the index option used, which would be needed and can only be used for PKs and UNIQUE indexes.

    CREATE TABLE...

  • RE: A more elegant way of creating 3 sets of columns from one column set table.

    This code is meant to be run in SSMS, then you can transform it into VB code. I would suggest to convert it to a Stored Procedure and call the...

Viewing 15 posts - 3,061 through 3,075 (of 8,731 total)