Is there any way to be able to select in SQL the current date and time of the time zone assigned to the database, even if the user changes the date of the operating system?
I have tried with the following sentences but if I change the date of...
I'm debugging this code
SqlCommand cmd2 = new SqlCommand("SELECT LOCT_LOGIN_EMAIL from LOCT_LOGIN_V Where LOCT_LOGIN_USUARIO=@usuario", cnsec);
cmd2.Parameters.AddWithValue("@usuario", usuario);
I would like to save a variable wi...
It turns out that I am trying to parameterize a querie , apparently it takes the data but returns an erroneous result for example.
Select campo from tabla where nombre ='pepito'
Does not return anything
select campo from tabla whe...
I have a dropdown that when the user selects it, he asks for a column of one db.
The problem is that I can do SQLinyection with the same options.
Next to the dropdown I have a field that also queries the db but it is parametrized, I wanted to kn...
I'm trying to update the data, but when I update it, I change the user_id, but I want to continue saving it.
Function,
public function actualizaPagador($id_pago,$id_usuario,$pago){
$db=BaseDatos::conectar();
try{...
A question to the knowledgeable public of this forum ..
I am with a system in Visual with MVC, in which I must consult some data and for this I must load initial information to the database with a dataset, it is filled with an excel file.
The qu...
I have created a function that responds to the following code:
-- Pasando un numero de departamento, obtener los empleados de este y su id.
CREATE FUNCTION F_Emp_NumEmp
(@NumDe NUMERIC(3))
RETURNS TABLE
AS
RETURN (...
Hi, I would like to do a SELECT of SQL server but only select me the last days from Monday to Sunday. NOT the last 7 days would be something like this:
select GETDATE() - 7
but in that only I get the last 7 days but I want to start from Mon...
I have this query but I like to add the number of calls and the sum TMO per hour example so I want to do it:
usuario 8 9 10
cantidad|tmo cantidad|tmo cantidad|tmo
juan 20 | 45.20 20 | 10.3 52...