Questions tagged as 'consulta-sql'

4
answers

Bring data from a table whose date is less than the smallest in another table

I want to do an SQL query to see certain 'inconsistencies' in a SQLServer database. To simplify it a bit, let's say that I have a table Movimiento_Paciente that contains a field pacienteId and another fechaInicio . In this...
asked by 25.10.2018 / 15:15
1
answer

Error in Android SQLite query

I want to make a query of the id_empresa of the table TABLE_CLIENTE , where the client_name is equal to what is inserted in the textView called et_searchClient , making the query INSIDE the activity. I already tried several...
asked by 27.08.2018 / 19:21
2
answers

SQL query between two SQL SERVER tables

I have two tables (tb_Product_M and tb_Product_Product) that presents a recursion, where a Product can have several Product children. In the table tb_Product_Product contains the data of the parent_Product_id that Products children has this. I n...
asked by 31.08.2018 / 21:16
3
answers

Help with query sql server 2008 pls

I have a table called usuarios which has several fields, one of them is the field estado_usuario which has as parameter 0, means the user is disabled and 1 which means that the user is valid. I need to count the number of curren...
asked by 01.10.2018 / 17:40
2
answers

MySQL query How many children does Berenice have?

This is the Database and what I want to know is how to ask how many children Berenice has create database padres_hijos; use padres_hijos; create table padres(padre_id varchar (20) primary key, nombres varchar(30), apellidos varchar (30))eng...
asked by 14.10.2018 / 05:30
2
answers

delete repeated values sql server

I have a problem in a sql server query ... I have this table where I need to delete repeated values (those marked in blue) due to the last column ('hh''mm') and try the DISTINCT but even so he shows them to me I do not know if I made my...
asked by 26.10.2018 / 20:46
1
answer

how to do a SQL query from different tables?

Good morning, I hope you can help me. I need to make the following query: Obtain the full name of the employees, as well as the name of the department, position and salary in which I have worked. I have the first query that is the following:...
asked by 28.11.2018 / 02:57
2
answers

Many-to-many relationships postgrest, consultation to take out in a single row

I have a table A : ----------------------------- | id | nombre | cel | ----------------------------- |1 | Juan | 1653727| |2 | Pedro | 6353526| |3 | Hernan | 4465672| ----------------------------- Another ta...
asked by 03.06.2018 / 20:58
1
answer

MYSQL query with range of Dates of an id

I'm doing a query on mysql, which should make me based on a given id and a range of dates, bring me the records between those dates. I'm starting to learn mysql so the most sure thing is that I'm formulating everything wrong. This is being im...
asked by 08.10.2018 / 17:23
0
answers

Generate and call database queries before or within html? [closed]

Well, I looked for this question, but I did not find any questions like this about the database queries only for the JavaScript or JQuery code. What is the best practice, call the database queries before starting HTML or inside the body? (I make...
asked by 16.08.2018 / 13:17