FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
|||
|
|||
Procedimiento almacenado en SQL Server
hola, tengo un SP que deberia chequear si existe el nombre de una empresa
antes de darla de alta, entonces si ya existe una empresa con ese nombre lo guarda en la variable @nombre, luego pregunto si la variable me devuelve un valor no nulo entonces ya existe una empresa con ese nombre, pero el SP me da el siguiente error: Mens 208, Nivel 16, Estado 6, Procedimiento SP_EXISTE_EMPRESA, Línea 17 Invalid object name 'dbo.SP_EXISTE_EMPRESA'. estoy usando Microsoft SQL Server Managment Studio Express, desde ya muchas gracias. ALTERPROCEDURE [dbo].[SP_EXISTE_EMPRESA] -- Add the parameters for the stored procedure here @SP_NOMBRE NVARCHAR(50), @NOMBRE NVARCHAR(50) OUTPUT AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; SELECT EMPRESAS.NOMBRE FROM EMPRESAS WHERE EMPRESAS.NOMBRE = @SP_NOMBRE RETURN @NOMBRE -- Insert statements for procedure here END |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
procedimiento almacenado | sargento elias | Firebird e Interbase | 1 | 14-04-2008 13:04:35 |
Procedimiento almacenado | efelix | MS SQL Server | 7 | 21-11-2007 17:53:00 |
ejecutar Procedimiento almacenado en SQL Server, Intraweb. | Roilo | Internet | 9 | 25-07-2007 18:01:32 |
Procedimiento Almacenado | scooterjgm | Conexión con bases de datos | 5 | 18-01-2005 18:21:32 |
Procedimiento Almacenado | Ulises | Providers | 3 | 30-01-2004 18:14:58 |
|