Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stored Proc Help!!!!!

Hi.

I have the below script to execute a stored proc but I keep on getting a syntax error. Can anyone give me the right format to start off with ( my first time doing this) Plz.

Thanx in advance.

Hein.ITR

WU_Vw:

Load

          DayName,

          EntryDate,

          Category,

          hl/hl,

          [Target hl/hl],

          Sort,

          TypeRef,

          DSort,

          SiteRef,

          SiteDescription,

          SiteProductCategoryRef,

          ProductType,

          TotalWaterSupply,

          Volumes

;

Sql

Declare

@DayName text,

@EntryDate datetime,

@Category text,

@hl/hl nvarchar(1000),

@[Target hl/hl] int,

@Sort int,

@TypeRef int,

@DSort int,

@SiteRef int,

@SiteDescription text,

@SiteProductCategoryRef int,

@ProductType text,

@TotalWaterSupply int,

@Volumes int

Exec <#RESULT> , '2012-04-01' , '2012-07-01' ,'Day','All',

          @DayName Output,

          @EntryDate Output,

          @Category Output,

          @[hl/hl]  Output,

          @[Target hl/hl] Output,

          @Sort Output,

          @TypeRef Output,

          @DSort Output,

          @SiteRef Output,

          @SiteDescription Output,

          @SiteProductCategoryRef Output,

          @ProductType Output,

          @TotalWaterSupply Output,

          @Volumes Output

 

Select

          @DayName,

          @EntryDate Output,

          @Category Output,

          @[hl/hl],

          @[Target hl/hl],

          @Sort,

          @TypeRef,

          @DSort,

          @SiteRef,

          @SiteDescription,

          @SiteProductCategoryRef,

          @ProductType,

          @TotalWaterSupply,

          @Volumes

;

1 Solution

Accepted Solutions
Not applicable
Author

I am not sure if I can answer myself,but I am going to do that if someone else wants to use this as a sample script:

SP_WU_Vw:
Load
DayName as NOD,
EntryDate,
Category,
[hl/hl] as hl_hl,
[Target hl/hl] as Target_hl_hl,
Sort,
TypeRef,
DSort,
SiteRef,
SiteDescription,
SiteProductCategoryRef,
ProductType,
TotalWaterSupply,
Volumes
;

Sql
Declare
@NOD varchar(20),
@EntryDate date,
@Category varchar(100),
@hl_hl int,
@Target_hl_hl int,
@Sort int,
@TypeRef int,
@DSort int,
@SiteRef int,
@SiteDescription varchar(100),
@SiteProductCategoryRef int,
@ProductType varchar(100),
@TotalWaterSupply int,
@Volumes int

Exec [dbo].[cc_WU_Overall] '2012-04-01' , '2012-07-01' ,'Day','All';


Store SP_WU_Vw into SP_WU_Vw.qvd (qvd);

Drop Table SP_WU_Vw;

View solution in original post

1 Reply
Not applicable
Author

I am not sure if I can answer myself,but I am going to do that if someone else wants to use this as a sample script:

SP_WU_Vw:
Load
DayName as NOD,
EntryDate,
Category,
[hl/hl] as hl_hl,
[Target hl/hl] as Target_hl_hl,
Sort,
TypeRef,
DSort,
SiteRef,
SiteDescription,
SiteProductCategoryRef,
ProductType,
TotalWaterSupply,
Volumes
;

Sql
Declare
@NOD varchar(20),
@EntryDate date,
@Category varchar(100),
@hl_hl int,
@Target_hl_hl int,
@Sort int,
@TypeRef int,
@DSort int,
@SiteRef int,
@SiteDescription varchar(100),
@SiteProductCategoryRef int,
@ProductType varchar(100),
@TotalWaterSupply int,
@Volumes int

Exec [dbo].[cc_WU_Overall] '2012-04-01' , '2012-07-01' ,'Day','All';


Store SP_WU_Vw into SP_WU_Vw.qvd (qvd);

Drop Table SP_WU_Vw;