This commit is contained in:
parent
5044cd454d
commit
7b3472aa0b
|
@ -1,6 +1,13 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`riskAllClients`(maxRiskDate DATE)
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`riskAllClients`(
|
||||||
|
vDate DATE
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
|
/**
|
||||||
|
* Retorna el riesgo de los clientes activos.
|
||||||
|
*
|
||||||
|
* @param vDate Fecha a calcular
|
||||||
|
*/
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tmp.clientGetDebt
|
CREATE OR REPLACE TEMPORARY TABLE tmp.clientGetDebt
|
||||||
(PRIMARY KEY (clientFk))
|
(PRIMARY KEY (clientFk))
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
|
@ -8,7 +15,7 @@ BEGIN
|
||||||
FROM client
|
FROM client
|
||||||
WHERE isActive;
|
WHERE isActive;
|
||||||
|
|
||||||
CALL client_getDebt(maxRiskDate);
|
CALL client_getDebt(vDate);
|
||||||
|
|
||||||
SELECT c.socialName,
|
SELECT c.socialName,
|
||||||
r.clientFk,
|
r.clientFk,
|
||||||
|
|
Loading…
Reference in New Issue