all groups > sql server reporting services > july 2006 >
I'd like to write a report with a data set that calls an Oracle data source for its result set. I have a package with a procedure that returns a ref cursor as an out variable. What is the syntax for calling this procedure from the Report Designer? Does the out variable with the cursor need to be mapped to anything? Are input parameters on the procedure anything other than regular @parameter references?
John, The sql syntax is identical to the that used for MS SQL Server, except for the @. Switch it to a : (colon) and the parameters will work just fine, example: Select Blah From tblBlah where Blah.tblBlah = :param I like to use the IN Keyword. If you set your parameters as multi-select, the parameters are passed in as an string seperated by commas, so your Where clause would look like this: Where Blah.tblBlah IN (:Param) Hope this helps, rwiethorn [quoted text, click to view] "John W at Sungard HE" wrote: > I'd like to write a report with a data set that calls an Oracle data source > for its result set. I have a package with a procedure that returns a ref > cursor as an out variable. What is the syntax for calling this procedure > from the Report Designer? Does the out variable with the cursor need to be > mapped to anything? Are input parameters on the procedure anything other > than regular @parameter references? >
Hi, Continuing with John's question, I want to know, What is the syntax for calling the oracle stored procedure from the Report Designer? My procedure is returning a ref cursor as an out variable. Regards, Aruna [quoted text, click to view] "rwiethorn" wrote: > John, > The sql syntax is identical to the that used for MS SQL Server, except for > the @. Switch it to a : (colon) > and the parameters will work just fine, example: > Select Blah > From tblBlah > where Blah.tblBlah = :param > > I like to use the IN Keyword. If you set your parameters as multi-select, > the parameters are passed in as an string seperated by commas, so your Where > clause would look like this: > Where Blah.tblBlah IN (:Param) > > Hope this helps, > rwiethorn > > > "John W at Sungard HE" wrote: > > > I'd like to write a report with a data set that calls an Oracle data source > > for its result set. I have a package with a procedure that returns a ref > > cursor as an out variable. What is the syntax for calling this procedure > > from the Report Designer? Does the out variable with the cursor need to be > > mapped to anything? Are input parameters on the procedure anything other > > than regular @parameter references? > >
Thanks for the response - the bit with the parameters defintely helps. Do you have an example that references a stored procedure instead of a select statement? For example, do I have to wrap the procedure call in a PL/SQL block like: BEGIN CallSomeProcedure( :InputParm1, :InputParm2, :OutputParm ) END or is it sufficient to call the procedure without the block like: CallSomeProcedure( :InputParm1, :InputParm2, :OutputParm ) And is the above parameter syntax going to work? What about the output parameter that accepts the cursor back from the stored procedure? Is that just set up as a report parameter like any other, even though it's an output parameter? Does it matter where the output parameter is placed in the call list, i.e. does it need to appear either first or last? Thanks! JW [quoted text, click to view] "rwiethorn" wrote: > John, > The sql syntax is identical to the that used for MS SQL Server, except for > the @. Switch it to a : (colon) > and the parameters will work just fine, example: > Select Blah > From tblBlah > where Blah.tblBlah = :param > > I like to use the IN Keyword. If you set your parameters as multi-select, > the parameters are passed in as an string seperated by commas, so your Where > clause would look like this: > Where Blah.tblBlah IN (:Param) > > Hope this helps, > rwiethorn > > > "John W at Sungard HE" wrote: > > > I'd like to write a report with a data set that calls an Oracle data source > > for its result set. I have a package with a procedure that returns a ref > > cursor as an out variable. What is the syntax for calling this procedure > > from the Report Designer? Does the out variable with the cursor need to be > > mapped to anything? Are input parameters on the procedure anything other > > than regular @parameter references? > >
change the command type to stored procedure. The syntax then looks like this packagename.procedurename no need to put any parameters in here. [quoted text, click to view] John W at Sungard HE wrote: > Thanks for the response - the bit with the parameters defintely helps. Do > you have an example that references a stored procedure instead of a select > statement? For example, do I have to wrap the procedure call in a PL/SQL > block like: > > BEGIN > CallSomeProcedure( :InputParm1, :InputParm2, :OutputParm ) > END > > or is it sufficient to call the procedure without the block like: > > CallSomeProcedure( :InputParm1, :InputParm2, :OutputParm ) > > And is the above parameter syntax going to work? What about the output > parameter that accepts the cursor back from the stored procedure? Is that > just set up as a report parameter like any other, even though it's an output > parameter? Does it matter where the output parameter is placed in the call > list, i.e. does it need to appear either first or last? > > Thanks! > > JW > > "rwiethorn" wrote: > > > John, > > The sql syntax is identical to the that used for MS SQL Server, except for > > the @. Switch it to a : (colon) > > and the parameters will work just fine, example: > > Select Blah > > From tblBlah > > where Blah.tblBlah = :param > > > > I like to use the IN Keyword. If you set your parameters as multi-select, > > the parameters are passed in as an string seperated by commas, so your Where > > clause would look like this: > > Where Blah.tblBlah IN (:Param) > > > > Hope this helps, > > rwiethorn > > > > > > "John W at Sungard HE" wrote: > > > > > I'd like to write a report with a data set that calls an Oracle data source > > > for its result set. I have a package with a procedure that returns a ref > > > cursor as an out variable. What is the syntax for calling this procedure > > > from the Report Designer? Does the out variable with the cursor need to be > > > mapped to anything? Are input parameters on the procedure anything other > > > than regular @parameter references? > > > > > > Thanks!
John, I'm a MS SQL Server guy myself, so I'm limited on the Oracle. I have a Oracle DBA that makes tables for me when I define my sql statement. I've not had the need to do any processing, I'm been only needing simple selects with groupings. [quoted text, click to view] >What about the output > parameter that accepts the cursor back from the stored procedure?
I think you can do with out it, the system may just 'swallow' the return value (ie a 0 or 1) indicating a success or failure. [quoted text, click to view] >Does it matter where the output parameter is placed in the call > list, i.e. does it need to appear either first or last?
Yes, parameter order does matter when your calling stored procs, you need to match the order and the data type. I hope this helps, rwiethorn [quoted text, click to view] "John W at Sungard HE" wrote: > Thanks for the response - the bit with the parameters defintely helps. Do > you have an example that references a stored procedure instead of a select > statement? For example, do I have to wrap the procedure call in a PL/SQL > block like: > > BEGIN > CallSomeProcedure( :InputParm1, :InputParm2, :OutputParm ) > END > > or is it sufficient to call the procedure without the block like: > > CallSomeProcedure( :InputParm1, :InputParm2, :OutputParm ) > > And is the above parameter syntax going to work? What about the output > parameter that accepts the cursor back from the stored procedure? Is that > just set up as a report parameter like any other, even though it's an output > parameter? Does it matter where the output parameter is placed in the call > list, i.e. does it need to appear either first or last? > > Thanks! > > JW > > "rwiethorn" wrote: > > > John, > > The sql syntax is identical to the that used for MS SQL Server, except for > > the @. Switch it to a : (colon) > > and the parameters will work just fine, example: > > Select Blah > > From tblBlah > > where Blah.tblBlah = :param > > > > I like to use the IN Keyword. If you set your parameters as multi-select, > > the parameters are passed in as an string seperated by commas, so your Where > > clause would look like this: > > Where Blah.tblBlah IN (:Param) > > > > Hope this helps, > > rwiethorn > > > > > > "John W at Sungard HE" wrote: > > > > > I'd like to write a report with a data set that calls an Oracle data source > > > for its result set. I have a package with a procedure that returns a ref > > > cursor as an out variable. What is the syntax for calling this procedure > > > from the Report Designer? Does the out variable with the cursor need to be > > > mapped to anything? Are input parameters on the procedure anything other > > > than regular @parameter references? > > >
Sorry, I did not get it. How I can send an OUT parameter (CURSOR) and use it to generate report? Thank you [quoted text, click to view] "rwiethorn" wrote: > John, > The sql syntax is identical to the that used for MS SQL Server, except for > the @. Switch it to a : (colon) > and the parameters will work just fine, example: > Select Blah > From tblBlah > where Blah.tblBlah = :param > > I like to use the IN Keyword. If you set your parameters as multi-select, > the parameters are passed in as an string seperated by commas, so your Where > clause would look like this: > Where Blah.tblBlah IN (:Param) > > Hope this helps, > rwiethorn > > > "John W at Sungard HE" wrote: > > > I'd like to write a report with a data set that calls an Oracle data source > > for its result set. I have a package with a procedure that returns a ref > > cursor as an out variable. What is the syntax for calling this procedure > > from the Report Designer? Does the out variable with the cursor need to be > > mapped to anything? Are input parameters on the procedure anything other > > than regular @parameter references? > >
Sorry, can I have more details, please. Like, what driver did you use, did you use parameters Tab to set parameter and so on. Thank you [quoted text, click to view] "gene.furibondo@gmail.com" wrote: > change the command type to stored procedure. > > The syntax then looks like this > > packagename.procedurename > > no need to put any parameters in here. > > John W at Sungard HE wrote: > > Thanks for the response - the bit with the parameters defintely helps. Do > > you have an example that references a stored procedure instead of a select > > statement? For example, do I have to wrap the procedure call in a PL/SQL > > block like: > > > > BEGIN > > CallSomeProcedure( :InputParm1, :InputParm2, :OutputParm ) > > END > > > > or is it sufficient to call the procedure without the block like: > > > > CallSomeProcedure( :InputParm1, :InputParm2, :OutputParm ) > > > > And is the above parameter syntax going to work? What about the output > > parameter that accepts the cursor back from the stored procedure? Is that > > just set up as a report parameter like any other, even though it's an output > > parameter? Does it matter where the output parameter is placed in the call > > list, i.e. does it need to appear either first or last? > > > > Thanks! > > > > JW > > > > "rwiethorn" wrote: > > > > > John, > > > The sql syntax is identical to the that used for MS SQL Server, except for > > > the @. Switch it to a : (colon) > > > and the parameters will work just fine, example: > > > Select Blah > > > From tblBlah > > > where Blah.tblBlah = :param > > > > > > I like to use the IN Keyword. If you set your parameters as multi-select, > > > the parameters are passed in as an string seperated by commas, so your Where > > > clause would look like this: > > > Where Blah.tblBlah IN (:Param) > > > > > > Hope this helps, > > > rwiethorn > > > > > > > > > "John W at Sungard HE" wrote: > > > > > > > I'd like to write a report with a data set that calls an Oracle data source > > > > for its result set. I have a package with a procedure that returns a ref > > > > cursor as an out variable. What is the syntax for calling this procedure > > > > from the Report Designer? Does the out variable with the cursor need to be > > > > mapped to anything? Are input parameters on the procedure anything other > > > > than regular @parameter references? > > > > > > > > Thanks! >
Don't see what you're looking for? Try a search.
|
|
|