I need to insert values in a table by SQL query that selects the different id_cliente that exist in the table Clientes with its amount and the rest of the fields in the table Facturas adding 1 to field num_factura (...
I have a question about how I can make queries in SQL Server with hours fields.
I have a column called hora_inicio_prestamo and another hora_fin_prestamo , both of type time(0) , I also have a column called Estado_presta...
Greetings guys I have the following sentence:
$query = "SELECT *
FROM pedidos
WHERE usuario = '$usua
AND status_pedido = 'ESPERANDO' ";
Just as it works perfectly but I would like it to also select if the condition is met status_qualifie...
I need to translate the following query from SQL to LINQ in .NET with C #:
This is the SQL query to translate:
SELECT COUNT(id_documento)
FROM documento
I need the value to be stored in a variable or to capture the n...
Today I have an optimization question, my boss wants me to save 60,000 records in the shortest possible time. For this I have made a query that takes information from a .csv file and I put it on a temporary basis, from which I make a small fil...
I have a database in Postgres that is already running a week and the amount of data entered is 3788, this number reflects the id of my table, plus I am informed that this amount is similinar per week.
I create the id in t...
In SQL Server, it is possible to make a INSERT INTO to a table using a SELECT :
INSERT INTO tabla (col, col2, col3)
SELECT col, col2, col3 FROM otra_tabla WHERE sql = 'ok'
Is this also possible for a UPDATE ? I have a...
I am a SQL beginner and I am creating a table, my doubt is that I have defined my start time and end time as VARCHAR2 to enter a time, which correspond to some classes (of a gym), that it would be more correct to create it with some type time...
This query is the final part of a store procedure that manages to show me the results in this way:
final_comparativo as (
select s.CeEmplazamiento, avg(s.Totales) TotalGeneral , s2.TotGral, @Mes as Mes
f...
I have a database called messaging , consisting of 3 tables
Table - users
Here the personal information of each user is stored.
______ _________ _________ ________
| idUs | nomUs | emailUs | codeUs |
────── ───────── ─────────...