COMO MONTAR O COMANDO SQL ?
                    Por favor em uma Tabela de movto, tenho os campos DEBITO, CREDITO, DATALAÇTO. 
Preciso somar os campos DEBITO em TOTALDEBITO, CREDITO EM TOTALCRDITO, e que tenham DATALACTO menor que data informada no form. Os totais de DEBITO E CREDITO, também preciso apesentar no form. Por favor me ajudem
Edison Roque
            Preciso somar os campos DEBITO em TOTALDEBITO, CREDITO EM TOTALCRDITO, e que tenham DATALACTO menor que data informada no form. Os totais de DEBITO E CREDITO, também preciso apesentar no form. Por favor me ajudem
Edison Roque
                    select  * from ((select sum(debito) from tabela where datalacto< textbox1.text) as totaldebito,  (select sum(credito) from tabela where datalacto< textbox1.text) as totaldebitocredito)
depois basta colocar nas textbox ou labels os valores:
txtTotalDebito.text = rs!totaldebito
txtTotalCredito.text = rs!totalcredito
                
            depois basta colocar nas textbox ou labels os valores:
txtTotalDebito.text = rs!totaldebito
txtTotalCredito.text = rs!totalcredito
                        Tópico encerrado , respostas não são mais permitidas