Posts by Fabio Souza • 21 points
2 posts
-
1
votes2
answers210
viewsA: Get older value from another table
Thank you all for your help. I managed to solve it in the following way: select e.produto, e.saldo from estoque e where CAST(Right('00' + Cast(Year(e.data) as sql_varchar),4) + '-' + Right('0' +…
-
1
votes2
answers210
viewsQ: Get older value from another table
need to create a query that returns the oldest stock of each product within a specified period: Tabela Produtos: ID DESCRICAO 1 TOMATE 2 ABACAXI Tabela Estoque: DATA HORA PRODUTO ESTOQUE 01/01/2015…