Viewing 8 posts - 1 through 8 (of 8 total)
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...
August 12, 2011 at 12:55 am
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...
March 20, 2011 at 3:46 am
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...
March 19, 2011 at 1:05 pm
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 *...
March 19, 2011 at 4:49 am
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...
March 18, 2011 at 1:10 am
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...
March 18, 2011 at 12:32 am
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...
March 17, 2011 at 7:16 am
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)...
March 17, 2011 at 6:30 am
Viewing 8 posts - 1 through 8 (of 8 total)