EdiSimoes Posted June 29, 2012 at 01:58 PM Report Share #466433 Posted June 29, 2012 at 01:58 PM Quero fazer uma query que me retorne os registros inseridos de hora em hora, banco sql server, alguem pode me ajudar? Edi Carlos Simões Estudante de Análise e Desenvolvimento de Sistemas edisimoes@bol.com.br http://www.desenvolvenetma.com.br http://analisedesistemas.bl.ee Link to comment Share on other sites More sharing options...
Caça Posted June 29, 2012 at 04:22 PM Report Share #466477 Posted June 29, 2012 at 04:22 PM Onde é que estás com dificuldade? O que é que já fizeste? Pedro Martins Não respondo a duvidas por PM Link to comment Share on other sites More sharing options...
EdiSimoes Posted June 29, 2012 at 07:07 PM Author Report Share #466492 Posted June 29, 2012 at 07:07 PM Fiz assim, "SELECT A.Codigo, A.NumeroFrota, A.Frente, A.Saida FROM Movimento A " & _ "INNER JOIN Abert_Movimento B ON A.codMov = B.codMov " & _ "WHERE B.Situacao = 1 AND A.Saida BETWEEN '06:00' AND '07:00' ORDER BY A.Saida" Edi Carlos Simões Estudante de Análise e Desenvolvimento de Sistemas edisimoes@bol.com.br http://www.desenvolvenetma.com.br http://analisedesistemas.bl.ee Link to comment Share on other sites More sharing options...
vascoc Posted June 29, 2012 at 08:44 PM Report Share #466509 Posted June 29, 2012 at 08:44 PM (edited) "SELECT A.Codigo, A.NumeroFrota, A.Frente, A.Saida FROM Movimento A INNER JOIN Abert_Movimento B ON A.codMov = B.codMov WHERE B.Situacao = 1 AND A.Saida BETWEEN '06:00' AND '07:00' ORDER BY A.Saida" "FROM Movimento A INNER JOIN Abert_Movimento B " O que é o A e o B? Acho estranho estarem assim no meio do código.. Experimenta fazer essa query na base de dados. exemplo:http://www.techotopia.com/images/c/c2/Vb_database_query_builder.jpg Edited June 29, 2012 at 08:55 PM by vascoc Link to comment Share on other sites More sharing options...
EdiSimoes Posted June 30, 2012 at 01:14 PM Author Report Share #466566 Posted June 30, 2012 at 01:14 PM o A e B são aliases das tabelas. Edi Carlos Simões Estudante de Análise e Desenvolvimento de Sistemas edisimoes@bol.com.br http://www.desenvolvenetma.com.br http://analisedesistemas.bl.ee Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now