Viewing 15 posts - 61 through 75 (of 748 total)
as an effort to troubleshoot this query, I modified it to:
WITH PivotData AS
(
select [ProjectWork Number], WeekNO, WeekValue From dbo.staging
)
select [ProjectWork Number], WeekValue, 'Apr-03-2016', 'Apr-10-2016'
From PivotData
PIVOT
(
Sum(WeekValue) For WeekNO in...
November 24, 2016 at 2:17 pm
I've created a dynamic sql for this, here is the generated dynamic query @sql
WITH PivotData AS
(
select [ProjectWork Number], WeekNO, WeekValue From dbo.staging
)
select [ProjectWork Number], WeekValue, Apr-03-2016, Apr-10-2016, Apr-17-2016,...
November 24, 2016 at 2:11 pm
Thanks.
I hope this will do now:
CREATE TABLE [dbo].[Staging](
[ProjectWork Number] [nvarchar](255) NULL,
[WeekNo] [nvarchar](12) NULL,
[WeekValue] [float] NULL
) ON [PRIMARY]
GO
INSERT INTO [dbo].[Staging] VALUES('12345', 'Dec 06, 2015', 12.3)
INSERT INTO [dbo].[Staging] VALUES('12345', 'Dec 13, 2015',...
November 24, 2016 at 1:29 pm
Y.B. (11/24/2016)
November 24, 2016 at 12:34 pm
OK, this is what I am going to do: I will create a table with:
CREATE TABLE [dbo].[WeekTable](
[ID] [int] IDENTITY(1,1) NOT NULL,
[QuaterNo] [varchar](7) NOT NULL,
[WeekNo] [varchar](11) NOT NULL
) ON [PRIMARY]
And I...
November 17, 2016 at 3:04 pm
Now I have imported 4 original sheets into 4 tables, with structure as below (Q1 as an example):
CREATE TABLE [dbo].[Q1 2016](
[ProjectWork Number] [nvarchar](255) NULL,
[ProjectWork Name] [nvarchar](255) NULL,
[WBS07 Lvl 1] [nvarchar](255)...
November 17, 2016 at 2:41 pm
I am thinking the final table be designed like this:
key columns:
ProjectWork Number
ProjectWork Name
non-key columns:
Employee Number
Resource Type
Location
Resource Role
Shore Type
Preferred Vendor
Value columns:
QuarterNo
WeekNo
WeekValue
Does that make sense? is there a better design? Thanks...
November 17, 2016 at 2:02 pm
Thank you Jo for the workaround.
Do you know if there is a way to save the package to run later? I am thinking if the package can be saved as...
November 15, 2016 at 9:52 am
Jo Pattyn (11/15/2016)
Perhaps an import wizard bugSee section "the automatic generated sql have single quote on table name, which cause error message"
Thank you but are you pasting the right link?...
November 15, 2016 at 9:35 am
Jeff Moden (11/12/2016)
halifaxdal (11/11/2016)
November 12, 2016 at 8:05 am
Jeff Moden (11/8/2016)
ZZartin (11/8/2016)
November 9, 2016 at 6:43 am
Alan.B (11/8/2016)
November 8, 2016 at 2:41 pm
Thanks for all the inputs, can anyone recommend a good ETL tool to perform tasks like this?
November 8, 2016 at 1:22 pm
Just to double check using Luis suggestion, I did it again from scratch and it works now, I deleted all the previous tables (generated but with 0 rows), from the...
November 8, 2016 at 9:32 am
I tried it again and increased the column size in Choose a Data Source->Advanced, I got the following errors:
- Validating (Error)
Messages
Error 0xc02020f4: Data Flow Task 1: The column "Company" cannot...
November 8, 2016 at 9:11 am
Viewing 15 posts - 61 through 75 (of 748 total)