Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
10| Name | Data Type | Length | Description |
|---|---|---|---|
| @action | varchar | 50 | |
| @user_id | int | 4 | |
| @client_id | int | 4 | |
| @route | varchar | 100 | |
| @clave_indicador | varchar | 100 | |
| @session_id | varchar | 50 | |
| @filtro | varchar | 100 | |
| @contrapartes | varchar | -1 | |
| @ip | varchar | 30 | |
| @identificacion | varchar | 50 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
-- Create the stored procedure in the specified schema
CREATE OR ALTER PROCEDURE dbo.user_client_action
@action VARCHAR(50),
@user_id INT NULL,
@client_id INT NULL,
@route VARCHAR(100) NULL,
@clave_indicador VARCHAR(100) NULL,
@session_id VARCHAR(50) NULL,
@filtro VARCHAR(100) NULL,
@contrapartes VARCHAR(MAX) NULL,
@ip VARCHAR(30) NULL,
@identificacion VARCHAR(50) NULL
-- add more stored procedure parameters here
AS
BEGIN
-- body of the stored procedure
IF ( @action = 'INSERTAR' )
BEGIN
INSERT INTO user_client_actions (
user_id,
client_id,
route,
session_id,
created,
clave_indicador,
filtro,
contrapartes,
ip,
identificacion
) VALUES (
@user_id,
@client_id,
@route,
@session_id,
GETDATE(),
@clave_indicador,
@filtro,
@contrapartes,
@ip,
@identificacion
);
--
RETURN;
END
END
GO
GO
-- Create the stored procedure in the specified schema
CREATE OR ALTER PROCEDURE dbo.user_client_action
@action VARCHAR(50),
@user_id INT NULL,
@client_id INT NULL,
@route VARCHAR(100) NULL,
@clave_indicador VARCHAR(100) NULL,
@session_id VARCHAR(50) NULL,
@filtro VARCHAR(100) NULL,
@contrapartes VARCHAR(MAX) NULL,
@ip VARCHAR(30) NULL,
@identificacion VARCHAR(50) NULL
-- add more stored procedure parameters here
AS
BEGIN
-- body of the stored procedure
IF ( @action = 'INSERTAR' )
BEGIN
INSERT INTO user_client_actions (
user_id,
client_id,
route,
session_id,
created,
clave_indicador,
filtro,
contrapartes,
ip,
identificacion
) VALUES (
@user_id,
@client_id,
@route,
@session_id,
GETDATE(),
@clave_indicador,
@filtro,
@contrapartes,
@ip,
@identificacion
);
--
RETURN;
END
END
GO
Depends On
1Used By
No items found