TOP n sometimes gives wrong number of lines (SSRS 2008 SP1)
Hello all,
a workmate has created a dashboard report which contains (among other items) a top n chart item. The user can select the value of n using a report parameter. We have observered that for some values of n and specific values of the other parameters the chart shows the wrong number of lines (bars), e.g. I choose to select TOP 5, but the chart shows in some cases the TOP 6.
Is such a behaviour already known?
I will try to create a minimal sample for reproducing this behaviour during the next few days.
Thanks in advance and best regards,
Gerald
Hi Jerry, I already tried this but for some reosan when i add the second filter data mismatches, I have used sort on $$ which is a requirement in my case.
Data with one filter($$) and Sort on ($$):
NBR
Desc
QTY
$$
Perc
67
MG
MIS
105
$7,197.44
64.02%
67
BR
BRO
21
$1,439.49
12.80%
67
CH
CHI
10
$685.47
6.10%
67
CR
CRA
7
$479.83
4.27%
67
LT
LSE
5
$342.74
3.05%
67
CF
FINISH
4
$274.19
2.44%
67
PW
PACKED
3
$205.64
1.83%
67
BL
BLIS
2
$137.09
1.22%
67
DN
DENT
2
$137.09
1.22%
67
CL
CLOU
1
$68.55
0.61%
67
CP
PURCHASE
1
$68.55
0.61%
67
IC
CONSTRUCTION
1
$68.55
0.61%
67
SH
SCRA
1
$68.55
0.61%
67
SS
SPLIT
1
$68.55
0.61%
Data when second filter($$ and Desc) added
NBR
Desc
QTY
$$
Perc
67
MG
MIS
105
$7,197.44
64.02%
67
CR
CRA
7
$479.83
4.27%
67
LT
LSE
5
$342.74
3.05%
67
PW
PACKED
3
$205.64
1.83%
67
DN
DENT
2
$137.09
1.22%
67
CL
CLOU
1
$68.55
0.61%
67
CP
PURCHASE
1
$68.55
0.61%
67
IC
CONSTRUCTION
1
$68.55
0.61%
67
SH
SCRA
1
$68.55
0.61%
67
SS
SPLIT
1
$68.55
0.61%
It displays only ten rows but you can see some of the rows Bro, Chi are missing(not sorted as above) when second filter is added on Desc column
Similar Messages
-
Number of line items in each Invoice
Hi Gurus,
I have one requirement
i need to display one column in the Report i.e. "Line items per eachinvoice" which should give the number of line items per that Invoice
when iam using tcode 'FB03' at ECC - Document Display it is giving
for Doc 1111 - 2 line items
for Doc 2222 - 12 line items
so in the report that column should display
2 for Doc 1111
12 for Doc 2222
please guide me how to do this
Thank youcreate a formula with constant 1
and set the exception aggregation as Total, and set the reference char as Line Item.
Make sure you have Invocie in the report.
- Danny -
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments
I am getting an error:
"ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'XYZ' ORA-06550: line 1, column 7: PL/SQL: Statement ignored".
Stored Procedure:
PROCEDURE XYZ
(ip_number IN NUMBER,
op_error_code OUT NUMBER,
op_error_text OUT VARCHAR2,
ret_cursor OUT OUT_CURSOR);
In the procedure I am selecting a details from few tables with respect to the input parameter 'ip_number'.
VB Code:
strConnectionString = CONNECTION_STRING
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.Open strConnectionString
Set objCommand = Server.CreateObject("ADODB.Command")
With objCommand
.ActiveConnection = objConnection
.CommandType = adCmdStoredProc
End With
With objCommand
.CommandText = "Pkg_1.XYZ"
.Parameters.Append objCommand.CreateParameter_
("ip_ipnumber",adNumeric,adParamInput,8,strIPNumber)
.Parameters.Append objCommand.CreateParameter_
("op_error_code",adNumeric,adParamOutput,10)
.Parameters.Append objCommand.CreateParameter_
("op_error_text",adVarChar,adParamOutput,512)
Set RS = .Execute()
End With
Its working fine with ASP(VB)+ Oracle9i + Windows2000.
But in ASP(VB) + Oracle 8.1.7 + Windows2000, its giving this error:
"ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'XYZ' ORA-06550: line 1, column 7: PL/SQL: Statement ignored".
Please help.Your procedure has 4 parameters 1 in and 3 out parameter
whereas in your VB code
Parameters.Append objCommand.CreateParameter_
("ip_ipnumber",adNumeric,adParamInput,8,strIPNumber)
.Parameters.Append objCommand.CreateParameter_
("op_error_code",adNumeric,adParamOutput,10)
.Parameters.Append objCommand.CreateParameter_
("op_error_text",adVarChar,adParamOutput,512)
There are only 3 parameter added where is the 4 th one ?
With Warm Regards
SSR -
Topped up wrong number by mistake
Hi I topped up a wrong number by mistake
there is only one digit in the difference from mine
they are also meteorHi KathleenLawrenc
Please send a mail to [email protected] with your number and PIN, we'll see what we can do for you.
-Adam -
Urgent : ADO / OraOLEDB gives random PLS-00306: wrong number or types of arguments
Hi people,
Using our production environment of Win2K AS, IIS 5.0 --> Win2K AS, COM+ / ADO, Oracle OLE DB 9i --> Solaris Oracle 9i we have a month of trace logs telling us that some calls to our PL/SQL package methods have the "PLS-00306: wrong number or types of arguments".
Closer examination of our development systems also revealed these errors that seem to occur fairly randomly. (No recompiles in the database [at least according to USER_OBJECT.TIMESTAMP] and no invalid packages or schema objects).
One call on a session will succeed (so there aren't any obvious syntax or data range boundary issues) and then with no obvious reason, a second call to the same package method will fail with the error message in the subject.
Anyone else seen this behaviour and know of a fix?
Thanks
Lachlan PittsHi,
The temp in the package and the temp in the anonymous block that calls the package are two different data types. They (coincidentally) have exactly the same number and type of elements, just as they (coincidentally) have exactly the same name, but they are still different.
Since the type is declare in the package head, you can reference it from oputside the package. You don't have to create a similar type in the calling block: just reference the package type, like this:
declare
v_out pkg_1.temp;
begin
pkg_1.DoSomething( 'a', 'b', v_out);
dbms_output.put_line(v_out.val1);
end; -
Error: Wrong number of arguments in method
Hi all,
I keep getting the above mentioned error when compiling simple JSPs with
only a few lines of codes. Here are the log dump.
Mon Aug 07 20:02:30 GMT+08:00 2000:<I> <ServletContext-General> file: init
Mon Aug 07 20:02:30 GMT+08:00 2000:<E> <ServletContext-General> Cannot find
resource 'language.html' in document root 'C:\weblogic\myserver\public_html'
Mon Aug 07 20:02:30 GMT+08:00 2000:<E> <ServletContext-General> Cannot find
resource 'top.html' in document root 'C:\weblogic\myserver\public_html'
Mon Aug 07 20:02:30 GMT+08:00 2000:<E> <ServletContext-General> Cannot find
resource 'language.html' in document root 'C:\weblogic\myserver\public_html'
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: init
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
verbose initialized to: true
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
packagePrefix initialized to: jsp
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
compileCommand initialized to: C:/jdk1.2.2/bin/javac.exe
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
srcCompiler initialized to weblogic.jspc
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
superclass initialized to null
Mon Aug 07 20:02:54 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
workingDir initialized to: C:\weblogic\myserver\classfiles
Mon Aug 07 20:02:55 GMT+08:00 2000:<I> <ServletContext-General> *.jsp: param
pageCheckSeconds initialized to: 1
Mon Aug 07 20:02:55 GMT+08:00 2000:<I> <ServletContext-General> *.jsp:
initialization complete
Mon Aug 07 20:02:55 GMT+08:00 2000:<I> <ServletContext-General> Generated
java file: C:\weblogic\myserver\classfiles\jsp\helloworld.java
Mon Aug 07 20:02:59 GMT+08:00 2000:<E> <ServletContext-General> Compilation
of C:\weblogic\myserver\classfiles\jsp\helloworld.java failed:
C:\weblogic\myserver\classfiles\jsp\helloworld.java:54: Wrong number of
arguments in method.
if (sci.isResourceStale("/helloworld.jsp", 933320916000L, "5.1.0
Service Pack 4 06/29/2000 18:18:23 #74560")) return true;
^
C:\weblogic\myserver\classfiles\jsp\helloworld.java:55: Wrong number of
arguments in method.
if (sci.isResourceStale("/dukebanner.html", 933321078000L, "5.1.0
Service Pack 4 06/29/2000 18:18:23 #74560")) return true;
^
2 errors
java.io.IOException: Compiler failed
executable.exec([Ljava.lang.String;[C:/jdk1.2.2/bin/javac.exe, -classpath,
c:\weblogic\lib\weblogic510sp4boot.jar;c:\weblogic\myserver\User.jar;c:\webl
ogic\myserver\Person.jar;c:\weblogic\myserver\TradingAccount.jar;c:\weblogic
\myserver\uniquesequence.jar;c:\weblogic\myserver\stockbroker.jar;;C:\jdk1.2
.2\jre\lib\rt.jar;C:\jdk1.2.2\jre\lib\i18n.jar;C:\weblogic\classes\boot;C:\w
eblogic\eval\cloudscape\lib\cloudscape.jar;c:\weblogic\lib\weblogic510sp4.ja
r;c:\weblogic\license;c:\weblogic\classes;c:\weblogic\myserver\serverclasses
;c:\weblogic\lib\weblogicaux.jar;C:\weblogic\myserver\tmp_deployments\ejbjar
-10126.jar;C:\weblogic\lib\persistence\WebLogic_RDBMS.jar;C:\weblogic\myserv
er\tmp_deployments\ejbjar-10125.jar;C:\weblogic\myserver\tmp_deployments\ejb
jar-10124.jar;C:\weblogic\myserver\tmp_deployments\ejbjar-10123.jar;C:\weblo
gic\myserver\tmp_deployments\ejbjar-10122.jar;C:\weblogic\myserver\tmp_deplo
yments\ejbjar-10121.jar;C:\weblogic\myserver\servletclasses;C:\weblogic\myse
rver\classfiles, -d, C:\weblogic\myserver\classfiles,
C:\weblogic\myserver\classfiles\jsp\helloworld.java])
at
weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.jav
a, Compiled Code)
at
weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java, Compiled Code)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
7)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:118)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:142)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:744)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:692)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:251)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
Mon Aug 07 20:02:59 GMT+08:00 2000:<E> <ServletContext-General> Servlet
failed with Exception
java.io.IOException: Compiler failed
executable.exec([Ljava.lang.String;[C:/jdk1.2.2/bin/javac.exe, -classpath,
c:\weblogic\lib\weblogic510sp4boot.jar;c:\weblogic\myserver\User.jar;c:\webl
ogic\myserver\Person.jar;c:\weblogic\myserver\TradingAccount.jar;c:\weblogic
\myserver\uniquesequence.jar;c:\weblogic\myserver\stockbroker.jar;;C:\jdk1.2
.2\jre\lib\rt.jar;C:\jdk1.2.2\jre\lib\i18n.jar;C:\weblogic\classes\boot;C:\w
eblogic\eval\cloudscape\lib\cloudscape.jar;c:\weblogic\lib\weblogic510sp4.ja
r;c:\weblogic\license;c:\weblogic\classes;c:\weblogic\myserver\serverclasses
;c:\weblogic\lib\weblogicaux.jar;C:\weblogic\myserver\tmp_deployments\ejbjar
-10126.jar;C:\weblogic\lib\persistence\WebLogic_RDBMS.jar;C:\weblogic\myserv
er\tmp_deployments\ejbjar-10125.jar;C:\weblogic\myserver\tmp_deployments\ejb
jar-10124.jar;C:\weblogic\myserver\tmp_deployments\ejbjar-10123.jar;C:\weblo
gic\myserver\tmp_deployments\ejbjar-10122.jar;C:\weblogic\myserver\tmp_deplo
yments\ejbjar-10121.jar;C:\weblogic\myserver\servletclasses;C:\weblogic\myse
rver\classfiles, -d, C:\weblogic\myserver\classfiles,
C:\weblogic\myserver\classfiles\jsp\helloworld.java])
at
weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.jav
a, Compiled Code)
at
weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java, Compiled Code)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
7)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:118)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:142)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:744)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:692)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:251)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
I believe that it has got something to do with the configuration of the
server and not the code in the JSPs. Have anyone encountered this error
before? Pls advice thanx!
Cheers,
kianhui
double d[] = new double[300];
getMax(d);Pass the array, not an element in the array. -
PLS-00306: wrong number or types of arguments in call in a for loop
Dear all
I recently put up another post about the same error message but as the message now relates to another part of my programme and, in my mind at least, a different conceptual idea, I thought I should start a new top. If that is not right thing to have done then please let me know. I am working in 10.2.
I am trying to pass through multiple variables. When I run the code at the end of this question I get an error message:
PLS-00306: wrong number or types of arguments in call to 'CUR_MAP_LIST'This relates to the line:
FOR var_map_list IN cur_map_list (par_map_list (n))I think the reason the error message comes up is because par_map_list is a associate array / PL/SQL table and cur_map_list is based on %rowtype. Although I could be wrong. However I am not sure what I should be doing so that I don't get such an error message.
I was reading through page 623 on Web Development 9i (by Brown; pub. McGrew-Hill) and pages 357-358 of Oracle Web Application Programming for PL/SQL Developers (by Boardman, Caffrey, Morse, Rosenzweig; pub. Prentice Hall), in order to try and write my code. As well as Oracle's Application Developer’s Guide - Fundamentals (Release 2), page 11-6. In particular the Web Development book uses the following:
create or replace procedure query_department
(in_dept_no owa_util.ident_arr)
is
cursor dept_cursor (nbt_dept_no emp.deptno%TYPE) is
select empno, ename, mgr, sal, comm
from scott.emp
where deptno = nbt_dept_no;
begin
for x in 1 .. in_dept_no.count loop
for dept_rec in dept_cursor(in_dept_no (x)) loop
end loop;
end loop;
end;In that example the cursor selects empno, ename, mgr, sal and comm from emp. So if it is doing that the cursor must be of a VARCHAR2 and NUMBER data type. What I don't understand is the for dept_rec in part. For a start I am not sure where dept_rec comes from? If it is a NUMBER data type, how can the in_dept_no, which is a owa_util.ident_arr associate array / PL/SQL data type work with it. Unfortunately because the example is incomplete and doesn't include procedures relating to the in variables, I am unable to run it and try and learn from what it is doing, so that I can try and relate the concept to my own work.
My programme is as follows. There may be other errors in the code not relating to this error. If so I hope to find these and resolve them once I understand what I should be doing here:
--Global variables--
gvar_mapviewer_host VARCHAR2(56) := 'http://tiger.iso.port.ac.uk:7785/mapviewer/omserver';
gvar_proc_host VARCHAR2(56) := 'http://tiger.iso.port.ac.uk:7785/www/geg50160';
gvar_xml_request VARCHAR2(100) :='?xml_request=<?xml version="1.0" standalone="yes"?>';
--Main calling programming--
PROCEDURE MAPS AS
empty owa_util.ident_arr;
var_xml_theme VARCHAR2(32767);
BEGIN
PROCMAPLIST (empty, var_xml_theme);
END maps;
--create checkboxes--
PROCEDURE PROCCHECKLIST
(par_check_list IN OUT owa_util.ident_arr,
par_xml_theme OUT VARCHAR2
AS
CURSOR cur_map_list IS
SELECT MT.map_title
MI.map_id
OMSN.map_sheet_number_id
WRMF.web_raster_map_id
FROM MAP_TITLE MT
MAP_INFO MI
MAP_SHEET_NUMBER OMSN,
WEB_RASTER_MAP_FILE WRMF,
WHERE MI.map_title_id = MT.map_title_id
AND MI.map_id = OMSN.map_id
AND WRMF.map_id = MI.map_id
AND WRMF.map_sheet_number_id = OMSN.map_sheet_number_id;
var_map_list cur_map_list%ROWTYPE;
var_xml_theme VARCHAR2(32767);
BEGIN
htp.htmlOpen;
htp.headOpen;
htp.headClose;
htp.bodyOpen;
htp.print('<FORM METHOD = "post"
ACTION = "'||gvar_proc_host||'.mappackage.procdisplay">');
htp.print('<FIELDSET>
<LEGEND> Select the maps you wish to display </LEGEND>');
FOR n IN 1 .. par_map_list.COUNT
LOOP
FOR var_map_list IN cur_map_list (par_map_list (n))
LOOP
htp.print(' <UL>
<LI>
<LABEL FOR = "WRMF'||
var_map_list.web_raster_map_id||'">
<INPUT type = "checkbox"
id = "WRMFB'||
var_map_list.web_raster_map_id||'"
name = "WRMFB'||
var_map_list.web_raster_map_id||'"
value = "'||var_map_list.web_raster_map_id||'"
/>
Map title: '|| var_map_list.map_title||'<BR>
Sheet number: '||var_map_list.map_sheet_number||'');
htp.print('</LABEL>
</LI>
</UL>');
END LOOP;
END LOOP;
htp.print('</FIELDSET>');
htp.print('<p>
<INPUT TYPE = "submit"
NAME = "Display selected maps"
VALUE = "Display selected maps" />
</FORM>');
htp.bodyClose;
END PROCCHECKLIST;Thank you for reading. Kind regards
TimDear everyone
I have now resolved the problems I was having with multiple values and checkboxes, thanks to comments in this thread, read large chucks of Oracle PL/SQL Programming by Steve Feuerstein and suddenly realising where I am going wrong in terms of thinking.
For a start, I when I was dealing with the multiple values, I was trying to get PL/SQL to pass them out. Of course this is done by the action part of the input form. Although I have not done much web coding, I did know about this. However because I was so engrossed in trying to understand how multiple values work, I didn't relate the two ideas. I even mind mapping the problem and still didn't get it.
I also did not think to change my the action from post command to get, so that I could see what was coming out. However that would not have made too much of a difference because the other problem I had was related to where sub programmes were declared. The function which received the values was privately declared, and not in the package spec. This meant the web browser could not find the function as that can only make use of the programmes declared publicly.
Once I made these changes, as well as correcting other minor typing mistakes, the values passed through as expected. The only other mistake I made was to include the name option after the submit input type. In my case I did not need to submit the value of that button. The revised code is as follows. In this version I replaced the function with a procedure that simply prints the checkbox values to screen. I have also made the input form action get, instead of post, so that the values can be seen in the web browser address bar:
create or replace
PACKAGE MAPSITE AS
PROCEDURE MAPS;
PROCEDURE PROCCHECKLIST
(par_check_list IN OUT OWA_UTIL.IDENT_ARR
PROCEDURE PROCDISPLAY
(maplist IN OUT OWA_UTIL.IDENT_ARR);
END MAPSITE;
create or replace
PACKAGE BODY MAPSITE AS
--Global variables--
gvar_mapviewer_host VARCHAR2(56) := 'http://tiger.iso.port.ac.uk:7785/mapviewer/omserver';
gvar_proc_host VARCHAR2(56) := 'http://tiger.iso.port.ac.uk:7785/www/geg50160';
gvar_xml_request VARCHAR2(100) :='?xml_request=<?xml version="1.0" standalone="yes"?>';
--Main calling programming--
PROCEDURE MAPS AS
empty owa_util.ident_arr;
BEGIN
PROCCHECKLIST (empty);
END MAPS;
--create checkboxes--
PROCEDURE PROCCHECKLIST
(par_check_list IN OUT owa_util.ident_arr
AS
CURSOR cur_map_list IS
SELECT MT.map_title,
MI.map_id,
OMSN.map_sheet_number_id,
WRMF.web_raster_map_id
FROM MAP_TITLE MT,
MAP_INFO MI,
MAP_SHEET_NUMBER OMSN,
WEB_RASTER_MAP_FILE WRMF
WHERE MI.map_title_id = MT.map_title_id
AND MI.map_id = OMSN.map_id
AND WRMF.map_id = MI.map_id
AND WRMF.map_sheet_number_id = OMSN.map_sheet_number_id;
BEGIN
htp.htmlOpen;
htp.headOpen;
htp.headClose;
htp.bodyOpen;
htp.print('<FORM METHOD = "post"
ACTION = "'||gvar_proc_host||'.mappackage.procdisplay">');
htp.print('<FIELDSET>
<LEGEND> Select the maps you wish to display </LEGEND>');
FOR var_map_list IN cur_map_list
LOOP
htp.print(' <UL>
<LI>
<LABEL FOR = "WRMF'||
var_map_list.web_raster_map_id||'">
<INPUT type = "checkbox"
id = "WRMFB'||
var_map_list.web_raster_map_id||'"
name = "maplist"
CHECKED = "' ||
par_map_list ||'"
value = "'||var_map_list.web_raster_map_id||'"
/>
Map title: '|| var_map_list.map_title||'<BR>
Sheet number: '||var_map_list.map_sheet_number||'');
htp.print('</LABEL>
</LI>
</UL>');
END LOOP;
htp.print('</FIELDSET>');
htp.print('<p>
<INPUT TYPE = "submit"
VALUE = "Display selected maps" />
</FORM>');
htp.bodyClose;
END PROCCHECKLIST;
---PROCDISPLAY PROCEDURE---
PROCEDURE PROCDISPLAY (maplist IN OUT owa_util.ident_arr)
IS
BEGIN
FOR n IN 1..maplist.COUNT
LOOP
htp.print('Checkbox value i.e. var_map_list.web_raster_map_id is: ' ||maplist(n)||'
<P>');
END LOOP;
END PROCDISPLAY;
END MAPSITE;Kind regards
Tim -
Error message: 450 [Wrong number of arguments or invalid property assignment]
Hello Support,
I have a vbscript which does some database query. i see from the log that script quits with the below error.
Error message: 450 [Wrong number of arguments or invalid property assignment]
but when i execute the same query directly on database, it gives me correct result. also i see that not all the time script quits with this error.
Does anyone have idea how to troubleshoot it?
-KAKA-i see. i know at which line it fails as error handling is done and will be written in the log.
sQuery_Prod = "select object_text from sto_ov_externalnode where name = '" & NodeId & "'"
oRecordSet_Prod.Open sQuery_Prod, oConnection, adOpenStatic, adLockOptimistic
if err.number <> 0 then
LogWrite ("Unable to run query")
LogWrite ("Query: [" & sQuery_Prod & "]")
LogWrite ("Connection string: [" & sConnect & "]")
LogWrite ("Error message: " & err.number & " [" & err.description & "]")
wscript.quit(1)
end if
and this piece of code write following in the log.
07.10.2014 16:55:03:Unable to run query
07.10.2014 16:55:03:Query: [select object_text from sto_ov_externalnode where name = '{B10255CF-F618-45FB-99BC-31A57D747702}']
07.10.2014 16:55:03:Connection string: [DSN=Script;DRIVER={SQL Native Client};User ID=xxxxxx;Password=yyyyyy]
07.10.2014 16:55:03:Error message: 450 [Wrong number of arguments or invalid property assignment]
Where as i can run query "select object_text from sto_ov_externalnode where name = '{B10255CF-F618-45FB-99BC-31A57D747702}'" successfully directly on database.
also in the next cycle same query will be successfull within script too.
Does this help in understanding the problem?
-KAKA- -
Hi,
We currently run Crystal Reports v10 with ODBC (CR Oracle ODBC Driver 4.20) to Oracle 9i database (on solaris) and have some reports which gets data (ref cursors) from stored procedures. So far so good and now we are upgrading our oracle database to 10g on Linux server and during my testing these reports give the following error.
Error Description:
Failed to open rowset
Query Engine Error: HY000:[DataDirect][ODBC Oracle driver]ORA-06550:line 1, column 8:
PLS-00306: wrong number or types of arguments in call to 'MY_STORED_PROCEDURE'
ORA-06550: line1, column 35:
PLS-00363: expression 'MY_PARAM_VALUE' cannot be used as an assignment target
ORA-6550: lin1, column8:
PL/SQL: Stateme'
Any help would be greatly appreciated.
Thanks,
-Venkat GopalanDiscovered on another post that 4.2 is too old. You need to upgrade to a more current ODBC driver that runs on Solaris.
We have a newer one version 5.3 but it's only for windows. Go to Datadirect.com and see if they have one for that OS.
Otherwise you'll have to configure your reports to use the native Oracle driver.
Thank you
Don -
Wrong number or types to call put_line.
I feel like I should know this but for some reason I am having a hard time putting something together to work. The initial SELECT statement:
SELECT dept, AVG(end_dt-start_dt) AS new_date FROM dept_dates GROUP BY dept;
ran outside the PL/SQL block returns the following:
DEPT NEW_DATE
Marketing 4.56
Adminis 5.43
Purch 2.33
When I run it inside a PL/SQL block and I try to use DBMS_OUTPUT.PUT_LINE, such as:
DECLARE
v_dept VARCHAR2(50);
v_new_date NUMBER;
BEGIN
SELECT dept, AVG(end_dt-start_dt) AS new_date
INTO v_dept, v_new_date
FROM dept_dates
GROUP BY dept;
DBMS_OUTPUT.ENABLE(100000);
DBMS_OUTPUT.PUT_LINE(v_dept,v_new_date);
END;
I get the error msg PLS-00306 wrong number or types of arguments in call to 'PUT_LINE'. Can someone please give me a quick rundown in how I can use the group by function and still us the put_line (or similar) function. It would be a great help. Thanks-AdamThanks for the help but I tried both methods and return the following:
Error report:
ORA-01422: exact fetch returns more then requested number of rows
ORA-06512: at line 5
01422. 00000 - "exact fetch returns more than requested number of rows"
*Cause: The number specified in exact fetch is less than the rows returned
*Action: Rewrite the query or change number of rows requested. -
PLS-00306: wrong number or types of arguments in call to 'MULTISET_INTERSE
CREATE OR REPLACE PACKAGE pkg_mkt_hub_load_collection
AS
PROCEDURE sp_final_load_mkt_hub;
END pkg_mkt_hub_load_collection;
CREATE OR REPLACE PACKAGE BODY pkg_mkt_hub_load_collection
AS
c_default_limit CONSTANT PLS_INTEGER:=5000;
PROCEDURE sp_final_lvl_idx_mon_hub;
PROCEDURE sp_final_lvl_idx_mon_hub
AS
CURSOR cur_lvl_idx_mon IS
SELECT idxmap.ssia_index_code,idxstg.start_date,idxstg.currency,idxstg.level1,idxstg.type,
idxstg.return_month,idxstg.return_3months, idxstg.return_6months, idxstg.return_ytd, idxstg.return_1year,
idxstg.return_3years, idxstg.return_5years,idxstg.return_10years,idxstg.market_cap,
idxstg.mkt_file_id
FROM mkt_total_lvl_indx_mon_stg idxstg,
md_vendor_index_map idxmap
WHERE idxmap.source = idxstg.source
AND idxmap.base_currency = idxstg.currency
AND idxmap.return_type = idxstg.type
AND idxmap.mkt_index_id = idxstg.vendor_code
AND idxmap.monthly = 'Y'
AND idxmap.file_type = 'T';
TYPE cur_lvl_idx_tab is table of cur_lvl_idx_mon%ROWTYPE;
cur_lvl_idx_rec cur_lvl_idx_tab;
CURSOR cur_idx_mon_hub IS
SELECT idxhub.ssia_index_id,idxhub.effective_date,idxhub.currency,index_level,idxhub.type,
idxhub.return_month,idxhub.return_3months, idxhub.return_6months, idxhub.return_ytd, idxhub.return_1year,
idxhub.return_3years, idxhub.return_5years,idxhub.return_10years,idxhub.market_cap,
idxhub.mkt_file_id
FROM mkt_total_lvl_indx_mon_hub idxhub;
TYPE cur_idx_mon_tab IS TABLE OF cur_idx_mon_hub%ROWTYPE;
cur_idx_mon_rec cur_idx_mon_tab;
l_col_3 cur_idx_mon_tab;
BEGIN
OPEN cur_lvl_idx_mon;
LOOP
FETCH cur_lvl_idx_mon BULK COLLECT INTO cur_lvl_idx_rec LIMIT c_default_limit;
EXIT WHEN cur_lvl_idx_mon%NOTFOUND;
END LOOP;
OPEN cur_idx_mon_hub;
LOOP
FETCH cur_idx_mon_hub BULK COLLECT INTO cur_idx_mon_rec LIMIT c_default_limit;
EXIT WHEN cur_idx_mon_hub%NOTFOUND;
END LOOP;
l_col_3 := cur_lvl_idx_rec MULTISET INTERSECT cur_idx_mon_rec;
CLOSE cur_lvl_idx_mon;
CLOSE cur_idx_mon_hub;
END sp_final_lvl_idx_mon_hub;
PROCEDURE sp_final_load_mkt_hub
AS
BEGIN
NULL;
END sp_final_load_mkt_hub;
END pkg_mkt_hub_load_collection;
show error
error code
Code: [Select all] [Show/ hide]SQL> @pkg_mkt_hub_load_collection.sql
Package created.
Warning: Package Body created with compilation errors.
Errors for PACKAGE BODY PKG_MKT_HUB_LOAD_COLLECTION:
LINE/COL ERROR
57/4 PL/SQL: Statement ignored
PLS-00306: wrong number or types of arguments in call to 'MULTISET_INTERSECT_ALL'
SQL>
please give an idea about this errorDeclaration is already visible.
TYPE cur_lvl_idx_tab is table of cur_lvl_idx_mon%ROWTYPE;The MULTISET operator must be used on collections of the same TYPE. You are attempting to use it on two different TYPEs
Since PL/SQL records cannot be compared for equality (yet) MULTISET operations on collections of PL/SQL record are not supported. You are attempting to use the MULTISET operator on collections of PL/SQL record.
I believe this is possible with a collection of persistent object type with a MAP or ORDER method.
But then again why not just use INTERSECT in SQL? -
PLS-00306: wrong number or types of arguments in call to . Error Help
I have create a algorithm which The member function at the end, returns xc and yc.
ERROR at line 9:
ORA-06550: line 9, column 63:
PLS-00306: wrong number or types of arguments in call to 'o'
ORA-06550: line 9, column 2:
PL/SQL: Statement ignoredGuess your function has: RETURN NUMBER
If so, the statement RETURN 'True' will give you exactly that error.
Also:
Return xc;
Return yc;
does not work as intended. The function will end by returning xc. (If it ever makes it that far) -
PLS-00306: wrong number or types of arguments in call to 'GET_CUST_ID'
i've created the below procedure, whenever i'm trying excuting its giving the following Error.
Please guide me how to solve this issu...........
SQL> create or replace procedure get_cust_id(in_source in varchar2,
2 in_reference_7 in varchar2,
3 cus_name out varchar2)
4 is
5 begin
6 if in_source ='Receivables' then
7 if in_reference_7 is null then
8 cus_name := '';
9 else
10 select cu.customer_name
11 into cus_name
12 from ra_customers cu
13 where cu.customer_id = to_number(in_reference_7);
14 fnd_file.put_line(100, cus_name);
15 end if;
16 end if;
17 end;
18 /
Procedure created.
SQL> exec get_cust_id('Receivables',1000) ;
BEGIN get_cust_id('Receivables',1000) ; END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GET_CUST_ID'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Thanks in Advance.
Srinivas.PVivek L wrote:
Vitor M.A. Rodrigues wrote:
If it has 3 varchar2 parameters then you should give 3 ... It should be something like this:
exec get_cust_id('Receivables','1000','1000') ;
Slight modification Victor.
If you see the signature of procedure, it has 2 IN params and 1 OUT param :
SQL> create or replace procedure get_cust_id(in_source in varchar2,
2 in_reference_7 in varchar2,
3 cus_name out varchar2)
4 isSo for parameter cus_name (which is an out parameter) value can not be assigned , but has to be captured in some local vaiable.
Something like this :
SQL> var t_out varchar2(4000);
SQL> exec get_cust_id(in_source => 'Receivables', in_reference_7 => 1000,cus_name => :t_out );
Sorry didn't see the OUT : (
edit: Vivek L Put the 1000 with '' ;) . Will edit my response : ) -
PLS-00306: wrong number or types of arguments in call to 'Test'
Hi,
I have problem in my package .. here i will give the sample code .. can u please help me to solve
i have
create or replace package TEST is
PROCEDURE WRITE_FILE();
end TEST;
CREATE OR REPLACE PACKAGE BODY TEST IS
TYPE TY_TIPE IS TABLE OF VARCHAR2(120) INDEX BY BINARY_INTEGER;
FUNCTION GET_COLLECTION(IN_INPUT IN VARCHAR2) RETURN TY_TIPE AS
V_TYPE TY_TIPE;
BEGIN
-- SOME OPERATION AND FINALLY
RETURN V_TYPE
END GET_COLLECTION;
PROCEDURE WRITE_FILE() AS
V_TYPE TY_TIPE;
BEGIN
V_TYPE:=GET_COLLECTION('test');
END WRITE_FILE;
END TEST;
At the line in bold .. am getting error "PLS-00306: wrong number or types of arguments in call to 'GET_COLLECTION'" like this
Please help me out
Regards
Prabu.pNo, it is not syntactically fine:
SQL> create or replace package TEST is
2
3 PROCEDURE WRITE_FILE();
4 end TEST;
5
6 /
Warning: Package created with compilation errors.
SQL> show error
Errors for PACKAGE TEST:
LINE/COL ERROR
3/22 PLS-00103: Encountered the symbol ")" when expecting one of the
following:
<an identifier> <a double-quoted delimited-identifier>
current
SQL>
SQL>
SQL> CREATE OR REPLACE PACKAGE BODY TEST IS
2
3 TYPE TY_TIPE IS TABLE OF VARCHAR2(120) INDEX BY BINARY_INTEGER;
4
5 FUNCTION GET_COLLECTION(IN_INPUT IN VARCHAR2) RETURN TY_TIPE AS
6
7 V_TYPE TY_TIPE;
8
9 BEGIN
10
11 -- SOME OPERATION AND FINALLY
12
13 RETURN V_TYPE
14
15 END GET_COLLECTION;
16
17 PROCEDURE WRITE_FILE() AS
18
19 V_TYPE TY_TIPE;
20
21 BEGIN
22
23 V_TYPE:=GET_COLLECTION('test');
24 END WRITE_FILE;
25
26 END TEST;
27 /
Warning: Package Body created with compilation errors.
SQL>
SQL>
SQL> show error
Errors for PACKAGE BODY TEST:
LINE/COL ERROR
15/1 PLS-00103: Encountered the symbol "END" when expecting one of the
following:
. ( * @ % & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
The symbol ";" was substituted for "END" to continue.
17/22 PLS-00103: Encountered the symbol ")" when expecting one of the
following:
<an identifier> <a double-quoted delimited-identifier>
current
SQL> This means that you posted some different code that you actually use,... how do you expect help if you don't show us what you have? -
Function sometimes return wrong data
Hi all.
I have a very strange problem with a function. Situation is this: I have an application that handles processes. Each process have a number of steps that is arranged in a matrix like layout. User clicks a step to start/execute it.
Now in a list of current processes i want to have an indication of how "far" a process has reached so i created a function for that and included that in my processlist fetch.
gchs_user_process_steps is the table where the user data for the process step is
gchs_process_steps is the definition table of what steps a process has
gchs_steps is the definition table of all steps
The below function is supposed to return latest step user clicked in the display matrix. tier is used to store the column number and sortorder is the row number of any step user clicked.
CREATE OR REPLACE FUNCTION FN_REACHEDSTEP(p_user_process_id NUMBER)
RETURN VARCHAR IS
ret VARCHAR(30);
ret_id INTEGER;
ret_num INTEGER;
BEGIN
ret := '';
ret_id := 0;
ret_num := 0;
BEGIN
SELECT substr(step_name,1,30),step_id,reached INTO ret,ret_id,ret_num
FROM (
SELECT a.*, rownum rnum
FROM (
SELECT s.name AS step_name, ps.id AS step_id, max((ps.tier*1000)+ps.sortorder) AS reached
FROM gchs_user_process_steps ups, gchs_process_steps ps, gchs_steps s
WHERE ups.gchs_process_step_id=ps.id AND
ps.gchs_step_id=s.id AND
ups.gchs_user_process_id=p_user_process_id
GROUP BY s.name,ps.id
ORDER BY 3 DESC) a
WHERE rownum <= 1 )
WHERE rnum >= 1;
EXCEPTION
WHEN OTHERS THEN
ret:='';
END;
RETURN ret;
EXCEPTION
WHEN OTHERS THEN
ret := '';
RETURN ret;
END FN_REACHEDSTEP;
Now the problem is that the function sometimes return wrong value. The name of the step that is returned is not the one i get if i run the SQL by itself.
So doing a
SELECT substr(step_name,1,30),step_id,reached INTO ret,ret_id,ret_num
FROM (
SELECT a.*, rownum rnum
FROM (
SELECT s.name AS step_name, ps.id AS step_id, max((ps.tier*1000)+ps.sortorder) AS reached
FROM gchs_user_process_steps ups, gchs_process_steps ps, gchs_steps s
WHERE ups.gchs_process_step_id=ps.id AND
ps.gchs_step_id=s.id AND
ups.gchs_user_process_id=21680
GROUP BY s.name,ps.id
ORDER BY 3 DESC) a
WHERE rownum <= 1 )
WHERE rnum >= 1;
and a
select fn_ReachedStep(21680) from dual;
will sometimes return different values.
So is the function fundamentally wrong or is there any cache or something that i've missed that could hold "old" function outputs or am i missing something else.
Thankful for any clues.
I'm using Oracle 10.2.0.1.0
Best regards
/Tomas
Edit: Here's some data that the system uses.
gchs_steps
ID NAME
10000 Step 1
10020 Step 2
10021 Step 3
10022 Step 4
10023 Step 5
10060 Step 6
10140 Step 7
gchs_process_steps
ID GCHS_STEP_ID TIER SORTORDER
10000 10000 0 1
10001 10020 1 1
10002 10021 1 2
10003 10022 2 1
10020 10023 3 5
10060 10060 3 4
10080 10140 3 2
10040 10040 3 3
10100 10160 4 3
10160 10220 4 2
11640 11640 3 1
11660 11660 0 6
11661 11661 0 7
11600 11600 0 4
11620 11620 4 1
gchs_user_process_steps
ID GCHS_USER_PROCESS_ID GCHS_PROCESS_STEP_ID
35541 21680 10002
38441 21680 10020
38440 21680 10000
52062 21680 10060
Relations beween table is
gchs_user_process_steps.gchs_process_step_id=gchs_process_steps.id
and
gchs_process_steps.gchs_step_id=gchs_steps.id
So doing the SQL alone will always return
SUBSTR(..) STEP_ID REACHED
Step 5 10020 3005
but executing the function sometimes returns
FN_REACHEDSTEP(21680)
Step 6
Also removing the rownum limits return and doing a
SELECT s.name AS step_name, ps.id AS step_id, max((ps.tier*1000)+ps.sortorder) AS reached
FROM gchs_user_process_steps ups, gchs_process_steps ps, gchs_steps s
WHERE ups.gchs_process_step_id=ps.id AND
ps.gchs_step_id=s.id AND
ups.gchs_user_process_id=21680
GROUP BY s.name,ps.id,ps.tier, ps.sortorder
ORDER BY 3 DESC
give this result
STEP_NAME STEP_ID REACHED
Step 5 10020 3005
Step 6 10060 3004
Step 3 10002 1002
Step 1 10000 1
Edited by: user4935832 on 2008-sep-19 01:38ORDER BY 3 DESC) a
WHERE rownum <= 1 )
WHERE rnum >= 1;Just some thoughts.
1. You could replace "ORDER BY 3" by "ORDER BY reached"
2. the rownum <=1 and rnum>=1 will return only one row... I don't understand the second one.
Lastly, the difference might come from a duplicate value return by your MAX() function.
If there is two rows (or more) with same MAX, Oracle might return one row arbitrary.
To get the same row, you have to use some aggregation function like MAX() KEEP (DENSE_RANK LAST...).
Here a try for your query, obviously not tested :
SELECT max(substr(step_name,1,30)) keep (dense_rank last order by reached) as step_name,
max(step_id) keep (dense_rank last order by reached,step_name) as step_id,
max(reached) as reached
FROM (SELECT s.name AS step_name,
ps.id AS step_id,
max((ps.tier*1000)+ps.sortorder) AS reached
FROM gchs_user_process_steps ups,
gchs_process_steps ps,
gchs_steps s
WHERE ups.gchs_process_step_id=ps.id
AND ps.gchs_step_id=s.id
AND ups.gchs_user_process_id=21680
GROUP BY s.name,ps.id) a;Nicolas.
Maybe you are looking for
-
How to handle multiple reports with single hyperlink parameter
Please suggest in my drill down report i have two reports linked with one hyperlink parameter, how to handle this? please suggest for popup window with sample solution. for example report A--->B--->Chosse Report c or D based on parameter hyperlink at
-
Accessing pubmed with any browser under OS X 10.5.8 stalls when next button is clicked at bottom of page of results. Does not happen in 10.6 or lion. Any suggestions?
-
Is it true a Mac will never get a virus?
Is it true a Mac will never get a virus? If it is not, what virus's should i be most worried about and how do i avoid them? Thanks.
-
HI In report builder am creating paramters.for that i have taken EMP table from Scott user in deptnum am displaying distinct deptno.if i select dept 10 ,empnum drop down should display empno's of deptno 10..if i select dept 20, empnum drop down shoul
-
Plant - purchasing org.
tables. which table wil give me plants and purchasing organizations. thanks