List daily logs?

1

My program inserts records of both the services and the computers of a school library. As such the library secretariat has to do a daily log and I would like to know if it is possible to only list the requisitions (services or computers) daily?

The way to insert the requisitions is:

Thecodeforthe"save" button

    
asked by anonymous 11.06.2015 / 16:15

2 answers

0

I believe your correct SQL is this one here:

SELECT Requisição.dataRequisicao, 
       Requisição.codRequisicao, 
       Utilizadores.numProcesso, 
       Utilizadores.nomeUtilizador, 
       Turma.Ano, 
       Turma.Turma, 
       Turma.Curso 
FROM Requisição 
INNER JOIN TipoServiço ON Requisição.codTpServico = TipoServiço.codTpServico
INNER JOIN Utilizadores ON Requisição.numProcesso = Utilizadores.numProcesso
INNER JOIN TpUtilizador ON Utilizadores.CodUtilizador = TpUtilizador.CodUtilizador 
INNER JOIN Turma ON Utilizadores.codTurma = Turma.codTurma 
WHERE (Convert(date, Requisição.dataRequisicao) = Convert(date, getdate()))

What you have posted in the comments has several syntax errors, with = missing and () more, so I advise you to test SqlServer first.

    
12.06.2015 / 15:41
0

First of all, this supposed "save" or technically known insert command is confused by the fact that your command is a "Select * from ...." selection only populating the grid on the nail? as for the listing, to be able to list all your records according to the current date just include a clause where ..

"Select * from requisicao where(dataRequisicao = getDate())"

(Note: For good programming practices it is not advisable to give names to tables, procedures, views, etc. with emphasis)

    
11.06.2015 / 20:00