VC table refresh w/ RFCs not stored procedures
I've got a complex model, but I'll separate out just a piece that represents what I want to do..I'll try to describe it. This particular example is for a list of approvers.
main model-> select "approvers" tool bar button->pop up iview that contains: start pt->RFC to get existing data from R/3 -> table view allowing user to add/edit/save/get defaults
Save button->RFC to save data->end pt->return to main model.
add or Edit button-> popup iview to form to input details w/ insert button to return entry to table view.
Get Defaults button -> popup iview to call RFC to read list of default approvers from r/3 and return all of them to table view.
The table will not refresh with the all of data returned from either popup iview. I have to save the data, sight unseen, return to the application and re-enter the approval iview before the table shows all of the data.
Here are the issues.
1. I've read the blogs and threads on the refresh button (which I tried, but since the records from the default and edit events hadn't been saved at that point, didn't work because they weren't in the database to be re-read.). I've also read about the timer, but can't figure out how to implement since (pulling from thread 3105110), it says use a timer as the start point of a table view...and I don't have anyway to have a start point of the table view since it is populated by the RFC that reads the database and the added/edited data is only in "memory" at this point.
2. The pop-up iview to return defaults will only return one record at a time. Even with the mapping set to all data rows and multiple selection allowed. Is there a way to just return all rows?
Can anyone point me in the right direction? My training is limited to reading here and the book SAP NetWeaver Visual Composer.
Hi
Instead of passing the data to the forms or tables by directly connecting them to the data sources, try and use signal out and signal in, if a table gets data from either of 2 sources then each source should have a signal out with the same name and the signal in should have the same name.
Jarrod Williams
Similar Messages
-
How to pass a table as parameter on a stored procedure
Hello all,
I want to pass the name of a table as parameter into a stored procedure, that will be used for cursors etc.
But when i pass the parameter and i compile the S.P. it give me error (error: table not existing...)
Any Help?
Thanks in advance, MarcoMarco wrote:
As i've written above, i'm using stored procedures like 'batch' programs which will be executed with oracle scheduler (passing to s.p. the name of the 'input' tables)
These input tables are 'external' tables which have got the same structure; for example i've got TABLEX_001, TABLEX_002, XXTAB etc. with the same structure.
This is the the reason... what do you think?An external table definition can reference multiple files via the LOCATION definition or you can user "ALTER TABLE" to alter the location and change the file that the external table points to.
Thus you only need one static External Table and use an alter table (via execute immediate) to change the file location it points to, or if you want all the data together, just specify all the files in the location.
That would be clean design, using one fixed table, without the need to pass any table names, just dynamically altering the file names if necessary at run time. -
Create a new table from another table that exists ussing a stored procedure
Hi,
I want to know if is posibble to create a new table from another table that exists ussing a stored procedure. This new table is created from other table that exists in the DB.
(in the next code the table tbl1 exist into the schema of the DB, but temp_tbl1 does not exist, it must be created by the procedure)
create or replace procedute temp is
temp_tbl1 tbl1%TYPE; //the temp_tbl1 will have the same type of tbl1
begin
create table temp_tbl1 as (select * from tbl1);
end temp;
thanks very muchcat wrote:
Hello,
I think my problem is not about this grant, because if I execute this as an "anonymous procedure":
DECLARE
BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE Abonus (id NUMBER, amt NUMBER)';
END;
It runs ok
But if I do:
CREATE OR REPLACE procedure temp as
BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE Abonus (id NUMBER, amt NUMBER)';
END;
I have the error
ORA-01031: Insufficient privileges
ORA-06512: at "temp", line 3Anonymous blocks are treated as "Invoker's Rights" from a privilege perspective whereas stored programs by default are treated as "Definer's Rights". Therefore using anonymous blocks is not a valid test to check this.
The simplest form of checking this issue is by executing
SET ROLE NONE;and then to run your statement/code block in question interactively. Using this approach you get in your session the effective rights of a "Definer's Rights" stored program, i.e. only privileges that you got granted directly to your user.
You can revert to the default setting by issuing
SET ROLE ALL;For more information regarding this topic, read e.g. the documentation:
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/subprograms.htm#LNPLS00809
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
Table of records from a stored procedure
Hi
Where could I find an example or documentation about how to retrive a table of records from a Stored Procedure ??
ThanksTry:
CREATE OR REPLACE TYPE scott.MYRECORDTYPE as object
(a int, b varchar2(40), c date, d number(10));
CREATE OR REPLACE TYPE scott.MYTABLETYPE is table of myrecordtype;
CREATE OR REPLACE PACKAGE BODY scott.MYPACKAGE
as
type number_collection is table of number(38) index by binary_integer;
type varchar2_collection is table of varchar2(4000) index by binary_integer;
type date_collection is table of date index by binary_integer;
g_data myTableType;
empno_col number_collection;
ename_col varchar2_collection;
hiredate_col date_collection;
mgr_col number_collection;
function my_function return myTableType
is
begin
select empno, ename, hiredate, mgr
bulk collect into empno_col, ename_col, hiredate_col, mgr_col
from emp
order by empno; -- Get some data
g_data := myTableType(); -- Initialize
for i in empno_col.first .. empno_col.last loop
g_data.extend; -- Write something in the array
g_data(i) := myRecordtype(empno_col(i), ename_col(i), hiredate_col(i), mgr_col(i));
end loop;
return g_data;
end;
end;
-- Demonstration-View
CREATE OR REPLACE VIEW scott.myview
AS
select a,b,c,d
from table(cast(myPackage.my_function() as mytabletype)); -
Check If Tables are being used in Stored Procedures & How many times !!
Dear All,
I want to make a script which can give me an answer, that If there is any table , then Whether It's using in any stored procedure or not ? If yes, then what the occurrence in procedures - means if table is "ABC" & Its being used in stored procedure
"XYZ" then i want to know that its using 1 time, 2 time or more in particular procedure ..
Pls Helpjust in-case if you want to get the Cross DB dependency
i have extent Visakh16 code
please use sql_modules to get the full definition of the DB Objects
you can replace stg_table with your decided table, also use dbname.schemaname.tablename if you want to get Cross DB dependency
just came up with this from
link
create table #temp (
dbname sysname,
name sysname,
Occurance int
exec sp_MSforeachdb '
use ?
DECLARE @TableName varchar(100)
SET @TableName = ''stg_table''
insert into #temp
SELECT db_name() ,name,(LEN(definition) - LEN(REPLACE(definition,'' '' + @TableName + '' '','''')))/LEN('' '' + @TableName + '' '') AS Occurance
FROM sys.sql_modules m
INNER JOIN sys.objects o
ON o.object_id = m.object_id
AND o.type = ''p''
WHERE m.definition LIKE ''% '' + @TableName + '' %'''
select *
from #temp
where dbname not in ('master','model','msdb','tempdb')
order by 1,2
Thanks
Saravana Kumar C -
List tables and column names a stored procedure is querying
Hello,
Is there a way to list tables and column names that a stored procedure is querying, i.e, selecting from, using T-SQL? If yes, is there a way to also show data types for the columns that a stored procedure is querying, i.e, selecting from?
Thank you,
LenfinkelOne way to view the dependencies of an object is to use SSMS; navigate to the object, right click and select "view dependencies". However this does not tell you what columns are being referenced by the Stored Procedure.
One way to view what is being referenced by a stored procedure is to run something like
select
text
from syscomments
where
id in
(select id
from sysobjects
where
name
=[Your Object Name]
And xtype
in
('p','P')
Please click "Mark As Answer" if my post helped. Tony C. -
Oracle equivalent of SAP BAPI/RFC? Stored Procedures?
Hello all.
I am looking at the development of integrating our desktop application with Oracle. We would like to upload/download objects from Oracle EAM such as Assets, Work Orders, etc using ODP.NET.
We already have a similar connector to SAP. In this system, we use SAP RFCs in combination with the SAP .Net Connector. SAP RFCs are like a middleware layer that carries out similar functions to the GUI and can be called from .Net. EG you might have an RFC named RFC_CREATE_EQUI, which matches Create Equipment in the GUI. SAP contains many default RFCs covering most of its functions.
I would like to know if there is anything similar to SAP RFCs in Oracle? I believe that stored procedures could be similar, but there are no defaults stored in Oracle.
Or do we just have to access the DB directly with SQL? If so, how do we go about data verification? EG So that I cannot upload an Asset without an Asset Number.
Thanks in advance for your help!I think I've found out what I need - Oracle Open Interfaces / APIs.
Could someone explain to me the easiest way of calling these from .NET?
Thanks! -
User can Execute SQL Statement but not Stored Procedure
I have a function in Access that calls a stored procedure to update a table. When I run it, it works fine but when the users try to run it, they get an error.
If I change it run the actual SQL syntax that is in the stored procedure then the users can run it and update the table without any problems, which makes no sense to me. It's doing the same exact thing as the stored procedure. I'd much rather have them be
able to run the procedures then writing the SQL in VBA modules because that's going to end up being a lot of code.
Any idea on why it's like this and how to correct it? Any assistance would be appreciated.Hello,
When you give a user permission to run a stored procedure, everything on that procedure but Dynamic SQL will be executed
without evaluating user permissions on the objects the stored procedure deals with.
On the link I provided above, you will see how to provide permissions to stored procedures. Try creating database roles, add user to database roles, then assign permissions to database roles.
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Add Table Valued Parameter to a stored procedure
I have a stored procedure that voids an invoice and puts the items back into inventory and makes available the payment that was used to apply to this invoice... I would like to be able to do all this for a number of invoices at a time using a table valued
parameter how would I be able to do it?
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Debra
-- Create date: March 25, 2014
-- Description: Void an invoice.
-- =============================================
CREATE PROCEDURE AR_VOID
-- Add the parameters for the stored procedure here
@Invoice INT,
@InvType nvarchar(3)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
IF(@InvType = 'reg')
BEGIN
UPDATE INV SET ONHAND = ONHAND + ARD.Qty ,STAMPED = CASE WHEN INV.TYPE = 'CIG' THEN STAMPED + ARD.QTY ELSE 0 END, LASTDATE = CONVERT(DATE, GETDATE()) FROM ARD JOIN INV ON ARD.ITEM = INV.ITEM
WHERE ARD.INVOICE = @Invoice
MERGE INTO RECEIPTSH target
USING (SELECT JOURNAL, SUM(AMOUNT) AMOUNT FROM Applied
WHERE INVOICE = @Invoice GROUP BY JOURNAL) AS source
ON target.Journal = source.Journal
WHEN MATCHED THEN
UPDATE
SET Applied = Applied - SOURCE.Amount;
DELETE Applied WHERE INVOICE = @Invoice
END
ELSE
BEGIN
UPDATE INV SET ONHAND = ONHAND - ARD.Qty ,STAMPED = CASE WHEN INV.TYPE = 'CIG' THEN STAMPED - ARD.QTY ELSE 0 END, LASTDATE = CONVERT(DATE, GETDATE()) FROM ARD JOIN INV ON ARD.ITEM = INV.ITEM
WHERE ARD.INVOICE = @Invoice
MERGE INTO ARH target
USING (SELECT INVOICE, SUM(AMOUNT) AMOUNT FROM CREDITMEMO WHERE CINVOICE = @Invoice GROUP BY INVOICE) AS source
ON target.INVOICE = source.INVOICE
WHEN MATCHED THEN
UPDATE
SET [OPEN] = 'TRUE', CLOSEDATE = NULL, PAID = target.PAID - source.AMOUNT;
DELETE CREDITMEMO WHERE CINVOICE = @Invoice
END
UPDATE ARH SET SUBTOTAL = 0, TAXES = 0, PAID = 0, STATUS = 'VOD', [OPEN] = 'FALSE', CLOSEDATE = CONVERT(DATE,GETDATE()) WHERE INVOICE = @Invoice
UPDATE ARD SET QTY = 0, ARD.PRICE = 0 WHERE INVOICE = @Invoice
END
GO
Debra has a questionTry
CREATE TYPE InvoicesList AS TABLE (InvoiceID INT)
GO
- =============================================
-- Author: Debra
-- Create date: March 25, 2014
-- Description: Voids passed invoices.
-- =============================================
CREATE PROCEDURE AR_VOID
@InvoicesList InvoicesList READONLY,
@InvType nvarchar(3)
AS
BEGIN
SET NOCOUNT ON;
IF(@InvType = 'reg')
BEGIN
UPDATE INV SET ONHAND = ONHAND + ARD.Qty ,STAMPED = CASE WHEN INV.TYPE = 'CIG' THEN STAMPED + ARD.QTY ELSE 0 END, LASTDATE = CONVERT(DATE, GETDATE()) FROM ARD JOIN INV ON ARD.ITEM = INV.ITEM
WHERE ARD.INVOICE IN (SELECT InvoiceID FROM @InvoicesList)
MERGE INTO RECEIPTSH target
USING (SELECT JOURNAL, SUM(AMOUNT) AMOUNT FROM Applied
WHERE INVOICE IN (SELECT InvoiceID FROM @InvoicesList) GROUP BY JOURNAL) AS source
ON target.Journal = source.Journal
WHEN MATCHED THEN
UPDATE
SET Applied = Applied - SOURCE.Amount;
DELETE Applied WHERE INVOICE IN (Select InvoiceID FROM @InvoicesList)
END
ELSE
BEGIN
UPDATE INV SET ONHAND = ONHAND - ARD.Qty,STAMPED = CASE WHEN INV.TYPE = 'CIG' THEN STAMPED - ARD.QTY ELSE 0 END, LASTDATE = CONVERT(DATE, GETDATE()) FROM ARD JOIN INV ON ARD.ITEM = INV.ITEM
WHERE ARD.INVOICE IN (SELECT InvoiceID FROM @InvoicesList)
MERGE INTO ARH target
USING (SELECT INVOICE, SUM(AMOUNT) AMOUNT FROM CREDITMEMO WHERE CINVOICE IN (SELECT InvoiceID FROM @InvoicesList) GROUP BY INVOICE) AS source
ON target.INVOICE = source.INVOICE
WHEN MATCHED THEN
UPDATE
SET [OPEN] = 'TRUE', CLOSEDATE = NULL, PAID = target.PAID - source.AMOUNT;
DELETE CREDITMEMO WHERE CINVOICE IN (SELECT InvoiceID FROM @InvoicesList)
END
UPDATE ARH SET SUBTOTAL = 0, TAXES = 0, PAID = 0, STATUS = 'VOD', [OPEN] = 'FALSE', CLOSEDATE = CONVERT(DATE,GETDATE()) WHERE INVOICE IN (SELECT InvoiceID FROM @InvoicesList)
UPDATE ARD SET QTY = 0, ARD.PRICE = 0 WHERE INVOICE IN (SELECT InvoiceID FROM @InvoicesList)
END
GO
I didn't look too close into your code, so I just translated your code as is into TVP.
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles -
RFC to Stored Procedure not response
Hi, I have this scenario, RFC <> XI <> JDBC all synchronous, the data are getting right to the JDBC but I'm receiving no response message from the JDBC, maybe I need to do another configuration.
First I tested the scenario sending the messages without the RFC throug HTTP message, and the JDBC gave me a response. Now that I use RFC I can't get any of it.
Any suggestions?
Regards.Hi, I found the solution to my problem!
It wasn't really an XI configuration, some one told my that in synchronous RFCs the programmer has to erase the line run in BACKGROUND, and catch the errors that XI could throw.
I search for any kind of documentation regarding this but I couldn't find any thing? Does somebody have anything?
Regards. -
Using temporary tables in stored procedures
Suppose that I have created a temporary table in a stored procedure using an "EXECUTE IMMEDIATE" statement. When I compile the procedure, that table is not created yet, so the compiler says that the table does not exist.
What is the way of using temporary tables in stored procedures?It's a good practice to avoid using DDL statements being executed from stored procedures. "Truncate Table" via dynamic SQL from stored procedure is a different story and is useful in DSS environments.
But if you insist on "creating" tables using Dynamic SQL from Stored Procedures then you must also embed your DML statements in Dynamic SQL to avoid compilation errors.
Example:
Create or Replace Procedure Proc_TestDynamicSQL is
Begin
Execute Immediate 'Create table myTable as select * from user_tables' ;
Execute Immediate 'Update myTable set table_name = ''Test'' ' ; --two single quotes before and after the string "Test"
End;
In this case, Oracle wouldn't care about the table references during compilation. -
Reports in BIDS does not update when stored procedure is modified
Hi,
I am using SQL Server 2008 R2 SP1, and BIDS 2008 SP1. The problem I am about to define does NOT happen when the report is deployed to the report server, but only within the report development environment (BIDS).
From within BIDS my reports are fed by stored procedures. The problem is when I modify a stored procedure in Management Studio, and refresh the report from within BIDS, the report does not reflect the new changes made in the stored procedure. So far I have
found one clumsy solution to this problem:
1) Go to the folder where the project is saved on the file system.
2)Find the ".data" file that is associated to the particular report, then delete it. For instance, if my report name is TestReport.rdl, find the file named TestReport.rdl.data, then delete it.
However, I would like to find a better, and permanent solution. Please comment.
Thank you!Hi AmirBabazadeh,
Base on my research, this issue is caused by data caching in the Business Intelligence Development Studio (BIDS). When we modify the stored procedure in Management Studio, but the data of the report doesn’t change, then it will try to cached data when reprocessing
the report. In this scenario, we should try to refresh the report/dataset, or delete the .rdl.data file to avoid this issue as you are now doing.
In order to refresh the data of the report, the following two methods are for your reference:
Manual refresh: Re-run the stored procedure with Query Designer in Dataset Properties dialog box.
Auto refresh: Set the AutoRefresh property of report to an appropriate value in the Properties window.
Hope this helps.
Thanks,
Katherine Xiong
If you have any feedback on our support, please click
here.
Katherine Xiong
TechNet Community Support -
Retrieving PL/SQL Table Type returned by stored procedure using Java.
Hi All,
I am facing an issue in a Stored Procedure (SP) which returns Table Type, the PL/SQL complex type.
Below mentioned is how my stored procedure looks like.
CREATE OR REPLACE package sp_test_pkg as
TYPE v_value_table_type is table of SW_VALID_CODE.swValue%Type
index by binary_integer;
v_swRMAStatus v_value_table_type;
procedure sp_test
(locale in int,
name in SW_CODE.swName%Type,
v_value_table out v_value_table_type,
batch_size in int,
out_batch_size in out int,
status out int);
end sp_test_lcode_code_pkg;
My java program to access this stored procedure is as given below:
import java.sql.*;
import oracle.jdbc.driver.*;
public class OracleTest {
public static void main(String args[]) {
Connection con = null;
OracleCallableStatement cstmt = null;
String url = "url";
String userName = "username";
String password = "password";
try
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
con = DriverManager.getConnection(url, userName, password);
cstmt = (OracleCallableStatement)con.prepareCall("begin " +
"sp_test_pkg.sp_test_pkg(?,?,?,?,?,?); end;");
cstmt.setInt(1, 1);
cstmt.setString(2, "Test");
cstmt.registerOutParameter(3, OracleTypes.ARRAY);
cstmt.setInt(4, 10);
cstmt.setInt(5, 1);
cstmt.registerOutParameter(5, Types.INTEGER);
cstmt.registerOutParameter(6, Types.INTEGER);
cstmt.execute();
} catch(Exception ex) {
ex.printStackTrace(System.err);
} finally {
if(cstmt != null) try{cstmt.close();}catch(Exception _ex){}
if(con != null) try{con.close();}catch(Exception _ex){}
When i execute this java program, i get the following error:
java.sql.SQLException: Parameter Type Conflict: sqlType=2003
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterBytes(OracleCallableStatement.java:245)
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:389)
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:452)
at OracleTest.main(OracleTest.java:49)
I am not sure where i am going wrong. I have never worked on such complex types before. I want to retrieve the complex table type returned by the stored procedure using my java source code.
Can anyone please help me out in resolving this issue?. This is very urgent.JDBC does not recognise types declared in PL/SQL. This is documented in the Dev Guide. [Find out more|http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/oraarr.htm#1057625].
The only work around would be to build a wrapper which calls your existing PL/SQL procedures and returns a SQL type instead. Obviously not knowing your precise scenario I have no idea how much work this entails for you. It may be worth building a code generator.
Cheers, APC
blog: http://radiofreetooting.blogspot.com -
Stored procedure and function - return table type
Hello again :)
I have one simple question :) Maybe on this forum the question was asked, but I found only similar question and they didn't help me.
It's possible return in Stored Function (with StoredProcedureFunction) as result return TABLE type? Or return table type with output parametr with Stored Procedure? Or instead of the table return the db object, but it is similar problem:)
Now, I can using db types TABLES or DB OBJECTS as INPUT parameters with call stored functions or procedures, for example:
I have this simple db object:
create or replace type BUFFER_DATA_R as object( detail VARCHAR2(4000 ))
And this simple table:
CREATE OR REPLACE TYPE BUFFER_DATA_T IS TABLE OF BUFFER_DATA_R
I create simple domain class object:
*public class DMBufferDataStruct {*
public String bufferData;
And I mapped in java with ObjectRelationalDataTypeDescriptor:
ObjectRelationalDataTypeDescriptor descriptor = new ObjectRelationalDataTypeDescriptor();
descriptor.setJavaClass(DMBufferDataStruct.class);
descriptor.setTableName("BUFFER_DATA_T");
descriptor.setStructureName("BUFFER_DATA_R");
descriptor.setPrimaryKeyFieldName("DETAIL");
descriptor.addFieldOrdering("DETAIL");
descriptor.addDirectMapping("bufferData", "DETAIL");
and join to server session ...
Well, i using this doimain class object as input parametr wih stored procedure call:
ObjectRelationalDatabaseField ordf = new ObjectRelationalDatabaseField("");
ordf.setSqlType(Types.STRUCT);
spCall.addNamedArgument(key, key,
Types.ARRAY,
"BUFFER_DATA_T",
ordf);
query.addArgument(key);
args.add(paramsInputs.get(key));
in paramsInputs is Vector of DMBufferDataStruct...
Well, this work fine!
But I can not figure, how to return this table from output parameters of stored procedure or as a return value from stored function?
Example of exceptions:
The number of arguments provided to the query for execution does not match the number of arguments in the query definition. - return as output parameter
PLS-00382: expression is of wrong type - used as result from stored function
So, my question is: Is possible return this table type from stored procedure or function? And if YES, how can I set output argument for call?
Thx advance!
Sorry for my English! :)
Best regards, KLDYour question is: what is faster PL/SQL or PL/SQL? And the answer is: it is PL/SQL of course!
As a general rule, you use a function when you return exactly one result: a number or a string or (more complex) instance of an object type or REF CURSOR or PL/SQL collection.
You use a procedure when:
a) you just do the job and return no result
b) you return multiple results - you can use multiple IN/OUT or OUT parameters
Imagine you have to write a program unit that performs a partitioned table maintenance by adding a partition.
You can implement this unit:
a) if you want return a "status code" (0 on successful completion or non-zero in case of error) then you should use a function
b) if you want no "status code" (in case of error an exception is raised that is handled outside of the program unit) then you should use a procedure
c) if you want "status code", name of tablespace where a partition was created (assume you program is so complex that it can choose different tablespaces based on metadata and free space available) and free space in that tablespace after the creation of a new partition then you should use a procedure with 3 OUT parameters.
But these are good programming practices that can be applied to (almost) any 3rd generation programming language, not only PL/SQL. -
PowerPivot tables and stored procedures
What can I use to dynamically create a PowerPivot table in excel, using a stored procedure as a data source?
Onyx12Hi there
Thank you for your response.
Here's what I'm trying to achieve and I stand under correction. I have a stored procedure which I want to mirror it's query result as a Pivot Table in Excel, and have done so by hard coding the execution code and imported it to Excel. But now I'm trying
to find out if there is another way to do this, in Excel though. I've been looking at solutions which include building macros, but I'm afraid SSMS does not support them. And even so, I'm not sure if building a macro is an ideal solution in this case. In essence,
I'm trying to retrieve data using a stored procedure, through the use of TSQL code in Excel. Please see query I've provided to Excel, using PowerPivot. I hope I've articulated myself thoroughly.
DECLARE @RC int
DECLARE @as_at_date datetime
DECLARE @all_versions bit
DECLARE @include_motor bit
DECLARE @include_reserve bit
-- TODO: Set parameter values here.
SET @as_at_date = GETDATE()
SET @all_versions = 0
SET @include_motor = 0
SET @include_reserve = 0
EXECUTE @RC = [dbo].[usp_claims_by_reserve]
@as_at_date
,@all_versions
,@include_motor
,@include_reserve
Onyx12
Maybe you are looking for
-
Broadcom Wireless Driver - LINUX (for Ubuntu LTS Slipstream)
Hello, I'm looking to build a slipstream ISO for Ubuntu LTS. The current LTS ISO comes with the wired NIC driver but not the wireless - can someone point me to the place to find the driver? I know I can plug in a wired connection and then do an updat
-
Cannot install sqldeveloper on windows7 OBI machine
Hi, I need simple instructions on how to get sql developer to work on my laptop running windows 7. Thanks, Russ
-
Desktop to phone - no files will be copying???
hello, in a video tutorial i have seen, when i want to change from muse desktop version to tablet or phone - it will be copying all files to this. but this doesnt work for me, the tablet or phone sites will be emty??? Where is the problem? Thanks for
-
Help setting up sent mailbox both on my mac and on the server
First things first - I have an exchange account and use Mail.app. The sent folder is set to store on server. That part works fine. What I want to be able to do is have subfolders under Sent mail the same way I have under trash and junk - options for
-
Sending FCP subclip to STP without sending the master clip!
I have a bunch of subclips I want to clean up in STP, but no matter what I've tried so far, I can't get it to just send the subclip, not the entire masterclip. Any suggestions?