|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
I'm working with some Stored Procedures that have been encrypted. I've decrypted the stored procedures and I can see everything that is contained in the stored procedure. When I try and add new fields to the query in the SQL I keep receivin the following message:
[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure or function sp_ShoppingGuide_GetArchivedRequestsByMAT2 has too many arguments specified. I've added one more field and then renamed the Stored Procedure by adding a number 2 at the end. I've changed the name in my code, and the previous error is what I keep getting. Any insight on this? Thanks. |
|
#2
|
||||
|
||||
|
post the code in the procedure.
|
|
#3
|
||||
|
||||
|
Quote:
I've tried even just copying the same exact code and just renaming the stored procedure and i still receive the same error. CREATE PROCEDURE sp_ShoppingGuide_GetArchivedRequestsByMAT @UserID int = NULL, @StartDate datetime, @EndDate datetime, @UnitID int = NULL with encryption AS SET @UserID = CASE WHEN @UserID IS NULL THEN 0 ELSE @UserID END SET @EndDate = @EndDate + 1 SET @UnitID = CASE WHEN @UnitID IS NULL THEN 0 ELSE @UnitID END EXECUTE(' SET CONCAT_NULL_YIELDS_NULL OFF SELECT a.RequestID, b.StatusID, -- a.Archived, -- a.DateArchived, a.DateEntered, a.Enteredby, b.Quantity, b.Comments, c.ItemID, c.ItemName, c.CatalogNumber, c.ServiceCode, f.UnitName, c.VendorName, FullName = dbo.udf_Utils_FormatFullName(e.Lastname, e.Firstname, e.MiddleName) FROM ShoppingGuide_Requests a INNER JOIN ShoppingGuide_RequestDetails b ON (a.RequestID=b.RequestID AND b.StatusID=100) LEFT JOIN ShoppingGuide_Items c ON b.ItemID=c.ItemID LEFT JOIN Emp_UserJob d ON a.UserJobID=d.UserJobID LEFT JOIN Emp_Users e ON (d.UserID=e.UserID) LEFT JOIN Emp_Units f ON (d.UnitID=f.UnitID) WHERE (a.Enteredby=' + @UserID + ' OR ' + @UserID + '=0) AND a.DateEntered BETWEEN ''' + @StartDate + ''' AND ''' + @EndDate + ''' AND (d.UnitID=' + @UnitID + ' OR ' + @UnitID + '=0) ORDER BY a.RequestID DESC, c.ItemName ') |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Too many arguments specified |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|