Forum Replies Created

Viewing 15 posts - 286 through 300 (of 709 total)

  • RE: Issue to restore Bak file to MS SQL 2008

    To get the list of database files in the backup (you will need to provide a new physical location for each file using the MOVE TO clause):

    RESTORE FILELISTONLY...

    Eddie Wuerch
    MCM: SQL

  • RE: Application Constantly Dropping and Re-Creating Tables

    ...the impact on the log file, possible fragmentation, etc. The tables themselves are small (typically 2-5 columns and anywhere from 5 - 100 records each) and we would be...

    Eddie Wuerch
    MCM: SQL

  • RE: select MAX per Group.

    drew.allen (7/22/2015)


    It sounds like you want to use the DENSE_RANK() function.

    ;

    WITH table_ranked AS (

    SELECT iINDEX, PARENTID, DOCUMENTID, QTY, REVNR, XREFID

    ,DENSE_RANK() OVER(PARTITION BY PARENTID ORDER BY REVNR DESC) AS dr

    FROM #TableA0

    )

    SELECT...

    Eddie Wuerch
    MCM: SQL

  • RE: SSRS 2005 - Why Compatibility Level 90?

    Are you using T-SQL commands that were new in SQL 2005, such as PIVOT, CTEs, ROW_NUMBER(), RANK_(), TILE()?

    Later versions of SQL Server allow you to use new T-SQL even though...

    Eddie Wuerch
    MCM: SQL

  • RE: SQL Kind of Pivot

    PIVOT will produce your results, provided that you are willing to specify the type names when you write the query:

    SELECT [Supplier Name], Onions, Potatos, Chocolate

    FROM

    (SELECT s.nam AS [Supplier...

    Eddie Wuerch
    MCM: SQL

  • RE: How to Pre-Pend Value to Existing Value While Creating a Temp Column?

    You can use literal values and variables much the same way you reference columns in a SELECT statement, and you may mix them.

    This shows adding a literal Domain value to...

    Eddie Wuerch
    MCM: SQL

  • RE: Deathly Performance with Sql Server Query

    Try this instead:

    SELECT DISTINCT SalesAccountNumber

    FROM Sales.SalesOrderHeader

    WHERE SalesEndDate!='30/12/3049'

    It's the same query with a lot less work.

    Eddie Wuerch
    MCM: SQL

  • RE: How do I download the SQL Server 2014 Install Files?

    How are you licensing SQL Server?

    If you want to (legally) download anything but freeware/trialware, then you'll need access an account with Microsoft that includes download rights, such as an...

    Eddie Wuerch
    MCM: SQL

  • RE: Temporary Tables Causing Stored Procedure Recompiles

    Yeah, those are SQL Server 2000 temp table habits. There were some improvements in SQL 2000 SP4, but SQL2005 and SQL2008 introduced a variety of tempdb improvements:

    - Deferred compilation...

    Eddie Wuerch
    MCM: SQL

  • RE: sql failover cluster and load balancing...

    In Windows clustering, any given instance (and the databases in it) are only live on one of the servers in the cluster at a time. No built-in load-balancing is possible.

    Clustering...

    Eddie Wuerch
    MCM: SQL

  • RE: Did I invent new feature for Count(*) over (Partition by 1) ?

    Try this next time:

    COUNT(*) OVER ()

    Eddie Wuerch
    MCM: SQL

  • RE: Tempdb issue

    The first order of business would be to add more space to tempdb, unless you truly know that this is a one-time or rare event. Given that you can't readily...

    Eddie Wuerch
    MCM: SQL

  • RE: Convert xml file into sql table

    Hooray for attribute-centric XML! Makes stuff way easier.

    The main trick here is to turn all of the <TargetModel> nodes into a table so we can go after each of the...

    Eddie Wuerch
    MCM: SQL

  • RE: Connection string issue for sql authentication

    Are you attempting to connect using your Windows domain credentials (user Domain\UserName)? If so, you don't specify user name or password. You just have to set it to use Windows...

    Eddie Wuerch
    MCM: SQL

  • RE: Parse XML data type to individual columns

    The code below works (substitute table column name for @x in the code below), but only if each element contains one or less of each child element. As in, there...

    Eddie Wuerch
    MCM: SQL

Viewing 15 posts - 286 through 300 (of 709 total)