This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE DEFINER=`root`@`localhost` PROCEDURE `new_procedure`() | |
| BEGIN | |
| DECLARE fim INT DEFAULT false; | |
| DECLARE var_id_lancamento_contabil_item int; | |
| DECLARE var_id_lancamento_contabil int; | |
| DECLARE var_id_conta_debito int; | |
| DECLARE var_id_conta_credito int; | |
| DECLARE var_valor_debito decimal(20,2); | |
| DECLARE var_valor_credito decimal(20,2); | |
| DECLARE var_stat tinyint; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| insert into AccountingTransaction (id_transacao_contabil,id_empresa,id_parceiro_principal,id_parceiro_operacional,id_descricao_transacao_contabil,dt_contabil,somatorio_lancamentos,stat_fechamento,des_complemento,tipo_lancamento_sped,stat) | |
| select a.id_lancamento_contabil,a.id_empresa,null,a.id_parceiro,null,a.dt_contabil,a.somatorio_lancamentos,a.status_fechamento,a.des,a.tipo_lancto_sped,a.stat from con_lancamento_contabil a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE DEFINER=`root`@`localhost` PROCEDURE `importacao_lancamentos`() | |
| BEGIN | |
| DECLARE fim INT DEFAULT false; | |
| DECLARE var_id_lancamento_contabil_item int; | |
| DECLARE var_id_lancamento_contabil int; | |
| DECLARE var_id_conta_debito int; | |
| DECLARE var_id_conta_credito int; | |
| DECLARE var_valor_debito decimal(20,2); | |
| DECLARE var_valor_credito decimal(20,2); | |
| DECLARE var_stat tinyint; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select | |
| pe.id_parceiro, | |
| 'VALE DA ESPERANCA' as nucleo, | |
| concat('R$ ', MAX(cast(replace(replace(replace(replace(c.value,"R$","")," ",""),".",""),",",".") AS decimal(10,2)))) as valor_total_em_aberto, | |
| DATE_FORMAT(NOW(),'%d/%m/%Y') as data_atualizacao_valor_total, | |
| pe.uc, | |
| pf.cpf as cpf_titular, | |
| pf.nome as titular, | |
| m.des as municipio, | |
| pf.cpf as cpf_beneficiado, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT COUNT(1) FROM erp_parceiro_classificacoes where id_classificacao = 8 and cast(replace(replace(replace(replace(value,"R$","")," ",""),".",""),",",".") AS decimal(10,2)) BETWEEN 150 AND 1000; | |
| SELECT id_parceiro, id_classificacao, cast(replace(replace(replace(replace(value,"R$","")," ",""),".",""),",",".") AS decimal(10,2)) FROM erp_parceiro_classificacoes where id_classificacao = 8 and cast(replace(replace(replace(replace(value,"R$","")," ",""),".",""),",",".") AS decimal(10,2)) BETWEEN 150 AND 1000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select * from AccountingBalanceSheet; | |
| desc AccountingBalanceSheet; | |
| select * from AccountingBalanceSheetAccountBalance;DELIMITER $$ | |
| CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_teste`() | |
| BEGIN | |
| -- declarando variaveis | |
| DECLARE fim INT DEFAULT false; | |
| DECLARE var_id_dado_coletado INT; | |
| DECLARE var_valor_identificador varchar(45); | |
| DECLARE var_pergunta varchar(100); |
NewerOlder