Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
3| Name | Data Type | Length | Description |
|---|---|---|---|
| @p_http_host | varchar | 200 | |
| @p_app_id | tinyint | 1 | |
| @accion | varchar | 20 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
/*
[obtener_web_data] 'www.avaldigital.com', '3'
[obtener_web_data] 'www.backend7.int',1
*/
CREATE OR ALTER PROCEDURE dbo.obtener_web_data
-- Add the parameters for the stored procedure here
@p_http_host varchar(200) = null,
@p_app_id tinyint = null,
@accion varchar(20) = null
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
if (@p_http_host is not null AND @p_app_id is not null AND @accion is null)
select TOP 1 webs.* FROM
(select web_id, web_name, web_title, http_host, uri_logo, uri_css1, uri_css2, uri_js1, uri_icon, app_id, 1 as precedence, copyright, id_plataforma ,servicio_contratado,id_menu_plataforma
from multi_web
where app_id = @p_app_id
and active = 1
and http_host LIKE '%' + @p_http_host + '%'
union
select web_id, web_name, web_title, http_host, uri_logo, uri_css1, uri_css2, uri_js1, uri_icon, app_id, 2 as precedence, copyright, id_plataforma ,servicio_contratado,id_menu_plataforma
from multi_web
where app_id = @p_app_id
and active = 1
and ISNULL(is_default, 0) = 1) webs
order by webs.precedence
if (@accion = 'BACKEND')
select web_id, web_name, web_title, http_host, uri_logo, uri_css1, uri_css2, uri_js1, uri_icon, app_id, 1 as precedence, copyright, id_plataforma ,servicio_contratado,id_menu_plataforma
from multi_web
where active = 1
and http_host LIKE '%' + @p_http_host + '%'
END
GO
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
/*
[obtener_web_data] 'www.avaldigital.com', '3'
[obtener_web_data] 'www.backend7.int',1
*/
CREATE OR ALTER PROCEDURE dbo.obtener_web_data
-- Add the parameters for the stored procedure here
@p_http_host varchar(200) = null,
@p_app_id tinyint = null,
@accion varchar(20) = null
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
if (@p_http_host is not null AND @p_app_id is not null AND @accion is null)
select TOP 1 webs.* FROM
(select web_id, web_name, web_title, http_host, uri_logo, uri_css1, uri_css2, uri_js1, uri_icon, app_id, 1 as precedence, copyright, id_plataforma ,servicio_contratado,id_menu_plataforma
from multi_web
where app_id = @p_app_id
and active = 1
and http_host LIKE '%' + @p_http_host + '%'
union
select web_id, web_name, web_title, http_host, uri_logo, uri_css1, uri_css2, uri_js1, uri_icon, app_id, 2 as precedence, copyright, id_plataforma ,servicio_contratado,id_menu_plataforma
from multi_web
where app_id = @p_app_id
and active = 1
and ISNULL(is_default, 0) = 1) webs
order by webs.precedence
if (@accion = 'BACKEND')
select web_id, web_name, web_title, http_host, uri_logo, uri_css1, uri_css2, uri_js1, uri_icon, app_id, 1 as precedence, copyright, id_plataforma ,servicio_contratado,id_menu_plataforma
from multi_web
where active = 1
and http_host LIKE '%' + @p_http_host + '%'
END
GO
Depends On
1Used By
No items found