Questions tagged as 'sql'

2
answers

asp classic SQL Injection [closed]

I have been looking for functions in% classic ASP to avoid sql Injection and from what I have seen there is no function. Yes I have seen that they exist in .NET but I have not found anything for ASP classic. Is there really...
asked by 20.07.2017 / 08:57
2
answers

Update of a table comparing or calculating with another [closed]

I need to do an Update of one table comparing or calculating with another. I have a table of jugadores with all your data including sueldo , rut , and other fields. Also, I have the table partidos with its respec...
asked by 27.11.2017 / 06:15
2
answers

How to count records of 3 tables linked by a foreign key?

I have a main table with one record, and in the other two tables there can be several records that depend on the record in table 1. I need you to show me only 1 record as it appears in image 1, but adding 3 more columns corr...
asked by 25.01.2018 / 06:51
2
answers

Algebraic Sum of 2 Select SQL Server 2012

Good morning, I have the following Select in SQL Server 2012, and I need to do an algebraic sum of both Select of the quantity and total fields, since the result of each one gives me positive and negative values. SELECT T0.U_CTS_Vendedor, T5.[...
asked by 11.09.2017 / 14:02
2
answers

SQL query WHERE primary_key = x

I was looking for a way to get a tuple where your primary key is equal to the value that I'm passing by parameter, that is: SELECT * FROM clientes WHERE primary_key = 1; Or it could be: SELECT * FROM boletas WHERE primary_key = 'boleta1';...
asked by 01.06.2017 / 15:14
2
answers

Store stored procedure results in temporary table

Background I have a procedure stored in a database in SQL Server 2012 1 that averages some values. This stored procedure receives as parameters two (2) values of type int. Example: IdFuntionary IdProcess 1 It is the version...
asked by 18.04.2017 / 18:57
2
answers

blocks of 15 days in sql in R

I have the following table:          id money date one fifteen 2009-02-07 one 30 2009-02-09 one Four. Five 2009-03-04 one fifty 2009-03-12 I would like to get the most money spent in every fortnight. For example, for the...
asked by 17.04.2017 / 15:38
3
answers

Get several data in a single mysql query

I have a mysql database of the index of a course (id,tipo,titulo,completado) I keep the different types that make up the index (classes, exercises and exams). I need to know how many exercises, classes and exams the course has to do so: S...
asked by 21.04.2017 / 20:40
1
answer

I try to get this query different

I need to draw from these three tables: user: user_type restaurant: all those restaurants that do not belong or do not have a type_user 1 (owner), that is to say in this case I would need to take out restaurant wine...
asked by 21.05.2017 / 18:26
1
answer

How to do frequency SQL queries per hour and per day?

I want to know when my application is the most used per hour and per day for comparative purposes for marketing. I can do it with the PostgreSQL database but the problem is that I do not know how to segment the results by hour and day. I have...
asked by 17.05.2017 / 10:58