it is possible to pass to the two parameters with two controls in one mask

@

@Roberto

I have this sp:

/* Definisco la stored procedure dbo.upI_AddStudent */
ALTER PROCEDURE dbo.upI_AddStudent
(
@FirstName varchar(10),
@LastName varchar(10)
)
AS
DECLARE @NextID int

/* Calcolo l'ID */
SELECT @NextID =
CASE
WHEN MAX(CAST(RIGHT(StudentID, 5) AS int)) IS NULL THEN 1
ELSE MAX(CAST(RIGHT(StudentID, 5) AS int)) + 1
END
FROM dbo.Students

/* Inserisco lo studente */
INSERT dbo.Students VALUES(
'P-' + RIGHT('0000' + CAST(@NextID AS varchar(5)), 5),
@FirstName,
@LastName
)

RETURN

it is possible to pass to the two parameters with two controls in one mask

you would make an example?

thanks

ciao
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top