473,396 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Is there a maximum perameter set for sql server?

46
This code produces a table fine, however its when I try to pull data from it in Access is when I get the problem. The error I receive in access is: Insufficient number of arguments were supplied for the procedure or function.

ALTER FUNCTION dbo.R114ReportCopy (@Acyear smallint)
RETURNS @RtnTab table
(DeptName varchar(100),Acyear smallint,
Eid smallint,FacName varchar(50),
FormName varchar(100), FormNo smallint,
IndN smallint, DivN smallint, DepN smallint,
IndAvCont float, IndSDCont float,
IndAvVal float, IndSDVal float,
DivAvCont float, DivSDCont float,
DivAvVal float, DivSDVal float,
DepAvCont float, DepSDCont float,
DepAvVal float, DepSDVal float,

LIndAvCont float, LIndSDCont float,
LIndAvVal float, LIndSDVal float, LIndN smallint,
LDivAvCont float, LDivSDCont float,
LDivAvVal float, LDivSDVal float, LDivN smallint,
LDepAvCont float, LDepSDCont float,
LDepAvVal float, LDepSDVal float, LDepN smallint,

CIndAvCont float, CIndSDCont float,
CIndAvVal float, CIndSDVal float, CIndN smallint,
CDivAvCont float, CDivSDCont float,
CDivAvVal float, CDivSDVal float, CDivN smallint,
CDepAvCont float, CDepSDCont float,
CDepAvVal float, CDepSDVal float, CDepN smallint,

Comments text)

AS
BEGIN
Declare @LastYear smallint
Set @Lastyear=@Acyear-1

Insert into @RtnTab
Select dbo.deptcodename(dept) Department,Num.*, comments
from


(
Select @acyear acyear,T.*,
Lavcontact,Lsdcontact,Lavvalue,Lsdvalue,Ln,
Ldvcontactav,Ldvcontactsd,Ldvvalueav,Ldvvaluesd,Ld vn,
Ldepcontactav,Ldepcontactsd,Ldepvalueav,Ldepvalues d,Ldepn,
Cavcontact,Csdcontact,Cavvalue,Csdvalue,Cn,
Cdvcontactav,Cdvcontactsd,Cdvvalueav,Cdvvaluesd,Cd vn,
Cdepcontactav,Cdepcontactsd,Cdepvalueav,Cdepvalues d,Cdepn
from

(
Select eid,dbo.idtoname(eid) Name,description formname,f.formno,
N,DvN,DepN,
avcontact,sdcontact,AvValue,SdValue,
dvcontactAV,dvcontactSD,dvValueAv,dvValueSD,
depContactAV,depContactSD,depValueAv,DepValueSD from R114ByYear(@Acyear,@Acyear) R, R114FormName F
where R.formno=F.formno
) T left join

(
Select eid,formno,
avcontact Lavcontact,sdcontact Lsdcontact,avvalue Lavvalue,sdvalue Lsdvalue,n Ln,
dvcontactav Ldvcontactav,dvcontactsd Ldvcontactsd,dvvalueav Ldvvalueav,dvvaluesd Ldvvaluesd,dvn Ldvn,
depcontactav Ldepcontactav,depcontactsd Ldepcontactsd,depvalueav Ldepvalueav,depvaluesd Ldepvaluesd,depn Ldepn
from R114ByYear(@Lastyear,@Lastyear) L
) L on T.eid=L.eid and T.formno=L.formno
left join

(
Select eid,formno,
avcontact Cavcontact,sdcontact Csdcontact,avvalue Cavvalue,sdvalue Csdvalue,n Cn,
dvcontactav Cdvcontactav,dvcontactsd Cdvcontactsd,dvvalueav Cdvvalueav,dvvaluesd Cdvvaluesd,dvn Cdvn,
depcontactav Cdepcontactav,depcontactsd Cdepcontactsd,depvalueav Cdepvalueav,depvaluesd Cdepvaluesd,depn Cdepn
from R114ByYear(1995,@Acyear) C
) C on T.eid=C.eid and T.formno=c.formno
) Num Left join


(
Select eid,formtype formno, comments from R114
where acadyear=@Acyear
and (comments is not null
or cast(comments as varchar(10)) not in ('NULL','NA','none','n/a','n.a',' ') )
) comment on Num.eid=comment.eid and Num.formno=comment.formno
,RVUMasterList M
where
M.acyear=@acyear
and Num.eid=M.eid
order by 1,4,5
Return
END
May 31 '07 #1
1 1096
Motoma
3,237 Expert 2GB
It sounds like you are not supplying the right number of arguments to one of your function calls.
Jun 1 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: David.Tymon | last post by:
>Description: MySQL v4.1.0-alpha only allows a client to prepare a maximum of 254 statements. On the 255th mysql_prepare() call, a failure is returned with no information returned by...
1
by: Dave Kissoondoyal | last post by:
We are running three web sites in a clustered environment WLBS. The web servers are connected to a Database Server running MS SQL server enterprise edition licensed as per CPU license. The Windows...
2
by: Hennie de Nooijer | last post by:
Because of an error in google or underlying site i can reply on my own issue. Therefore i copied the former entered message in this message....
0
by: Matt | last post by:
I am running CR 8.5 from a (large) SQL Server db. My aim is to use crystal enterprise so end users in our sales team can access reports on demand for a given date range and client so I am trying...
2
by: teddysnips | last post by:
SQL Server 2000 8.00.760 (SP3) I've been working on a test system and the following UDF worked fine. It runs in the "current" database, and references another database on the same server called...
2
by: Kums | last post by:
What is the maximum permissible size of a database? Is there any limitation. What is the maximum # of tablespace's allowed in a database? Thanks for your response.
2
by: fa | last post by:
Hi there, I have created an .aspx file using Asp.Net (2.0) C#, which contains two webparts. How can i pass data/parameter between these two, so that when user chooses an item from WebPart1, I can...
5
by: alingsjtu | last post by:
Hello, every body. When execute dynamic generated multiple OPENQUERY statements (which linkes to DB2) in SQLServer, I always got SQL1040N The maximum number of applications is already connected...
6
by: fiefie.niles | last post by:
In ASP.Net (VS 2005), is there a way to limit the user to upload a file up to certain size (say, I would like to limit the user to upload at the maximum 1 meg of file) ? Thank you
0
by: =?Utf-8?B?UmljYXJkbyBRdWludGFuaWxsYQ==?= | last post by:
I have an Adam (active directory application mode) instance on windows server 2003, and the server does not belong to a domain, i mean it is a standalone server. So in this context the policies...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.