Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)

  • RE: ssis package as source to another ssis package?

    No, Packages cannot act as data sources for another package. A package is simply a collection of tasks and data flows that act on data and is not a source...

  • RE: Pivot/cross tab question

    Hi Warren

    I am not sure if you want two separate sets or not, if you want to return one set with the data pivoted then you can use this query

    declare...

  • RE: How do Select inThis order ..........? Please

    This is one way to get the result you asked for

    SELECT COLUMN1,COLUMN2 FROM MYTABLE

    ORDER BY ROW_NUMBER() OVER (PARTITION BY COLUMN1,COLUMN2 ORDER BY COLUMN1,COLUMN2),COLUMN1,COLUMN2

    But as Gail said you will need...

  • RE: SQL Query

    There are two ways to approach is problem

    The first is to use pivot and unpivot such as

    select Name,[2010-05-01 00:00:00.000],[2010-06-02 00:00:00.000],[2010-07-03 00:00:00.000] from

    (

    select s1.Name,s2.Mdate,s1.Value from

    (

    select Name,RowNo,Value from

    (

    select *...

  • RE: Multiple values in same column.

    Hi Pooja

    Ninja is correct, your tables should be properly normalised. This solution does not scale well, have you given any thought as to how you are going pull the values...

  • RE: sp problem?

    Hi Pravin

    I am guessing that you are trying to move a stored procedure from one database to another and have scripted out the SQL code. If this is the case...

  • RE: Return ColumnName from Max Value in columns

    Hi Frank

    I`ve only half answered your question, this will return the column name as well

    CREATE TABLE DBO.SOMETABLE

    (

    ROWID INT IDENTITY(1,1),

    COL1 INT,

    COL2 INT,

    COL3 INT,

    COL4 INT,

    COL5 INT

    );

    INSERT INTO DBO.SOMETABLE(COL1,COL2,COL3,COL4,COL5) VALUES(1,6,3,8,9);

    INSERT INTO DBO.SOMETABLE(COL1,COL2,COL3,COL4,COL5) VALUES(24,23,6,4,3);

    INSERT...

  • RE: Return ColumnName from Max Value in columns

    Hi Frank

    This is one possible solution using unpivot

    CREATE TABLE DBO.SOMETABLE

    (

    ROWID INT IDENTITY(1,1),

    COL1 INT,

    COL2 INT,

    COL3 INT,

    COL4 INT,

    COL5 INT

    )

    INSERT INTO DBO.SOMETABLE(COL1,COL2,COL3,COL4,COL5) VALUES(1,6,3,8,9)

    INSERT INTO DBO.SOMETABLE(COL1,COL2,COL3,COL4,COL5) VALUES(23,1,6,4,3)

    SELECT COL1,COL2,COL3,COL4,COL5,M.COL_MAX_COL

    FROM DBO.SOMETABLE T

    LEFT JOIN

    (

    SELECT ROWID,MAX(col)...

Viewing 8 posts - 1 through 8 (of 8 total)