Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
1| Name | Data Type | Length | Description |
|---|---|---|---|
| @p_http_host | varchar | 200 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
/*
exec obtener_multi_web_data 'www.avaldigital.com'
exec obtener_multi_web_data 'backend.inquirovitae.com'
exec obtener_multi_web_data 'www.inquirovitae.com'
exec obtener_multi_web_data 'candidato.inquirovitae.com'
*/
/*
select * from multi_web where http_host='www.avaldigital.com'
select * from multi_web where http_host='www.inquirovitae.com'
*/
CREATE OR ALTER PROCEDURE dbo.obtener_multi_web_data
-- Add the parameters for the stored procedure here
@p_http_host varchar(200) = 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)
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
from multi_web
where /*app_id = @p_app_id*/
active = 1
and http_host = @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
from multi_web
where /*app_id = @p_app_id*/
active = 1
and ISNULL(is_default, 0) = 1) webs
order by webs.precedence
END
GO
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
/*
exec obtener_multi_web_data 'www.avaldigital.com'
exec obtener_multi_web_data 'backend.inquirovitae.com'
exec obtener_multi_web_data 'www.inquirovitae.com'
exec obtener_multi_web_data 'candidato.inquirovitae.com'
*/
/*
select * from multi_web where http_host='www.avaldigital.com'
select * from multi_web where http_host='www.inquirovitae.com'
*/
CREATE OR ALTER PROCEDURE dbo.obtener_multi_web_data
-- Add the parameters for the stored procedure here
@p_http_host varchar(200) = 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)
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
from multi_web
where /*app_id = @p_app_id*/
active = 1
and http_host = @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
from multi_web
where /*app_id = @p_app_id*/
active = 1
and ISNULL(is_default, 0) = 1) webs
order by webs.precedence
END
GO
Depends On
1Used By
No items found