Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I can call a stored procedure in MSSQL 2012 from QV. No worries there. My SP returns a table. Yeah, got it, I can see it in QV.
The call is as simple as:
SQL EXECUTE [SP_NAME] @year=2013;
The table returned is defined like this in the SP:
DECLARE @myTable table (id int, serialNumber varchar(20), type int, weekNumber int, new int);
But I would actually like to give aliases to the columns returned from the SP, just like when loading data using a simple SQL select or load from Excel.
Is there a way to do this from within Qlikview or is the only solution to extend the signature of the SP by providing names for the resulting columns so that the call becomes like this:
SQL EXECUTE [SP_NAME] @year=2013, @name1='name1', @name2='name2', @name3='name3' (etc);
Thanks a lot!
Use a preceding load:
LOAD id as ID, serialNumber as SerialNo, type as Type, weekNumber as WeekNo, new as IsNew;
SQL EXECUTE [SP_NAME] @year=2013, @name1='name1', @name2='name2', @name3='name3' (etc);
The result of the sql statement is piped into the preceding load where you can process the data further.
Use a preceding load:
LOAD id as ID, serialNumber as SerialNo, type as Type, weekNumber as WeekNo, new as IsNew;
SQL EXECUTE [SP_NAME] @year=2013, @name1='name1', @name2='name2', @name3='name3' (etc);
The result of the sql statement is piped into the preceding load where you can process the data further.
Thanks, I did not try this permutation ... it works just as I want it to!