Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
1| Name | Data Type | Length | Description |
|---|---|---|---|
| @palabras | varchar | 8000 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE OR ALTER PROCEDURE dbo.obtener_edictos_homonimos_test
@palabras varchar(8000) /*= -- 'NEAR((RODRIGUEZ,JUAN,MANUEL),0,true) OR NEAR((RODRIGUEZ,MANUEL,JUAN),0,true) OR NEAR((JUAN,RODRIGUEZ,MANUEL),0,true) OR NEAR((JUAN,MANUEL,RODRIGUEZ),0,true) OR NEAR((MANUEL,RODRIGUEZ,JUAN),0,true) OR NEAR((MANUEL,JUAN,RODRIGUEZ),0,true)'
*/
AS
BEGIN
--declare @palabras varchar(8000) = 'NEAR((RODRIGUEZ,JUAN,MANUEL),0,true) OR NEAR((RODRIGUEZ,MANUEL,JUAN),0,true) OR NEAR((JUAN,RODRIGUEZ,MANUEL),0,true) OR NEAR((JUAN,MANUEL,RODRIGUEZ),0,true) OR NEAR((MANUEL,RODRIGUEZ,JUAN),0,true) OR NEAR((MANUEL,JUAN,RODRIGUEZ),0,true)'
SET NOCOUNT ON
select distinct top 50 id_boletin, provincia_boletin, convert(varchar(11),fecha_publicacion,103) as fechab,fecha_publicacion, cast(contenido_archivo as varchar(max)) AS contenido_archivo,razon_social
from sociedades_constituciones
where (documento_soc is null or documento_soc = '' ) and (contains(nombre_integrante,@palabras) or contains(razon_social,@palabras))--) and cast(contenido_archivo as varchar(max)) !=''
order by fecha_publicacion desc
END
GO
GO
CREATE OR ALTER PROCEDURE dbo.obtener_edictos_homonimos_test
@palabras varchar(8000) /*= -- 'NEAR((RODRIGUEZ,JUAN,MANUEL),0,true) OR NEAR((RODRIGUEZ,MANUEL,JUAN),0,true) OR NEAR((JUAN,RODRIGUEZ,MANUEL),0,true) OR NEAR((JUAN,MANUEL,RODRIGUEZ),0,true) OR NEAR((MANUEL,RODRIGUEZ,JUAN),0,true) OR NEAR((MANUEL,JUAN,RODRIGUEZ),0,true)'
*/
AS
BEGIN
--declare @palabras varchar(8000) = 'NEAR((RODRIGUEZ,JUAN,MANUEL),0,true) OR NEAR((RODRIGUEZ,MANUEL,JUAN),0,true) OR NEAR((JUAN,RODRIGUEZ,MANUEL),0,true) OR NEAR((JUAN,MANUEL,RODRIGUEZ),0,true) OR NEAR((MANUEL,RODRIGUEZ,JUAN),0,true) OR NEAR((MANUEL,JUAN,RODRIGUEZ),0,true)'
SET NOCOUNT ON
select distinct top 50 id_boletin, provincia_boletin, convert(varchar(11),fecha_publicacion,103) as fechab,fecha_publicacion, cast(contenido_archivo as varchar(max)) AS contenido_archivo,razon_social
from sociedades_constituciones
where (documento_soc is null or documento_soc = '' ) and (contains(nombre_integrante,@palabras) or contains(razon_social,@palabras))--) and cast(contenido_archivo as varchar(max)) !=''
order by fecha_publicacion desc
END
GO
Depends On
1Used By
No items found