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_lista | varchar | 100 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE OR ALTER PROCEDURE dbo.backend_complejidad_doc_lista
-- Add the parameters for the stored procedure here
@p_lista varchar(100)
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_lista IS NOT NULL)
SELECT led_complejidad_doc.*,
users1.first_name + ' ' + users1.last_name AS creada_por,
users2.first_name + ' ' + users2.last_name AS modificada_por
FROM led_complejidad_doc
INNER JOIN users AS users1 on led_complejidad_doc.created_by = users1.user_id
INNER JOIN DelimitedSplit8K(@p_lista, ',') Complej
ON led_complejidad_doc.complejidad = Complej.Item
LEFT OUTER JOIN users AS users2 on led_complejidad_doc.modified_by = users2.user_id
ORDER BY led_complejidad_doc.descripcion_complejidad
END
GO
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE OR ALTER PROCEDURE dbo.backend_complejidad_doc_lista
-- Add the parameters for the stored procedure here
@p_lista varchar(100)
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_lista IS NOT NULL)
SELECT led_complejidad_doc.*,
users1.first_name + ' ' + users1.last_name AS creada_por,
users2.first_name + ' ' + users2.last_name AS modificada_por
FROM led_complejidad_doc
INNER JOIN users AS users1 on led_complejidad_doc.created_by = users1.user_id
INNER JOIN DelimitedSplit8K(@p_lista, ',') Complej
ON led_complejidad_doc.complejidad = Complej.Item
LEFT OUTER JOIN users AS users2 on led_complejidad_doc.modified_by = users2.user_id
ORDER BY led_complejidad_doc.descripcion_complejidad
END
GO
Depends On
3Used By
No items found