Forum Replies Created

Viewing 15 posts - 1,591 through 1,605 (of 3,509 total)

  • RE: How can I pull unique rows from table

    Then explain in plain English how that's supposed to happen. Once I know that, I can probably code it.

  • RE: SQL Query assistance

    first you'd have to post the definitions of views 1, 2, and 3.

  • RE: How can I pull unique rows from table

    SELECT Client_ID
        , MAX([Amount]) AS MaxAmount
    FROM ##TEMP
    WHERE Amount>0
    GROUP BY Client_ID;

  • RE: Query Help

    without some CREATE TABLE statements and some consumable sample data, there's no way for anyone to really help you. Please read this article and follow the instructions so...

  • RE: Help with SQL Loop Query

    I posted a link to Jeff's article so you would read it. One of the keys to getting an answer is asking a good question, and Jeff explains how to...

  • RE: Pivot Table

    Could you post your expected completed pivot given the data provided?

  • RE: Pivot Table

    Did you read Jeff Moden's article about crosstabs/pivots in T-SQL?

  • RE: Help with SQL Loop Query

    "Not working" is not terribly helpful when diagnosing a query.
    post the T-SQL for your query and maybe we can help.

    For someone that's been here as long as...

  • RE: Help with SQL Loop Query

    Look up examples for CROSS APPLY and TOP...  Here's Itzik's example from Itzik Ben-Gan on SQL 2008

    SELECT D.orderID, D.productID, D.qty
    FROM Sales.Orders AS O
    CROSS APPLY 

  • RE: Filtering a query

    use a correlated subquery and [NOT] EXISTS to find parent records with/without child records.  Just too lazy/tired to sort out the mess without sample data.

  • RE: t-sql 2012 calculation

    Got some table definitions and some sample data and some expected results? You know, same old same old.

  • RE: t-sql 2012 calculation

    I would like the calculation to display own the output window and/or the messages window when executing SSIS 2012 manager.

    False. This is an SSIS question.

  • RE: Issue with OUT Param

    your stored procedure won't even compile.  Besides, there's no declaration of your output parameter.  It's declared just like an input parameter, but it's got an OUTPUT tag on it.

  • RE: Sum up the different versions of SQL in a column.

    CREATE TABLE DBs(Environ VARCHAR(4), SQLVersion VARCHAR(14));

    SELECT Environ, SQLVersion, COUNT(*) AS Count
    FROM DBs
    GROUP BY Environ, SQLVersion;

  • RE: Select first row that changed

    Like this is one way...
    CREATE TABLE #Test(
    RowID INT IDENTITY,
    EmpID CHAR(5) DEFAULT 'JDOE3',
    ManagerID CHAR(6),
    Yr INT,
    ...

Viewing 15 posts - 1,591 through 1,605 (of 3,509 total)