I'm doing an SP to perform a specific search with parameters, but it brings me the following error. How to solve it?
Msg 137, Level 15, State 2, Procedure spPantallaTasa, Line 6 Must declare the scalar variable "@aseguradora".
Msg 137, Level 15, State 2, Procedure spPantallaTasa, Line 10 Must declare the scalar variable "@aseguradora".
SQL:
CREATE PROC spPantallaTasa
@asegradora VARCHAR(20)
AS
IF (@aseguradora = 'Caracas')
BEGIN
Select Año, TipoCotizacion, Estatus, TipoVehiculo, SubTipoVehiculo, ClaseCompañia, Zona
FROM [dbo].[RelacionClaseTasa], [dbo].[MPF_Tasas]
WHERE Aseguradora = @aseguradora
END
ELSE
BEGIN
SELECT 1
END