Questions tagged as 'sql'

1
answer

database query duplicates me the same when joining other tables

I am consulting several tables, the main table t_persona has 441,153 records and the table t_evaluación has 471,558. The evaluation table can have several times the code of the person since a person can have 1 or more evaluations....
asked by 17.10.2018 / 19:59
2
answers

1 Duplicate results with INNER JOIN

Thanks for letting me register here. In this opportunity I am a programmer of a new social network which took a day with only one problem. I have 3 tables and of the 3 tables one is duplicating me the images or tripling. <?php...
asked by 26.07.2018 / 00:14
2
answers

GROUP BY in SQLServer does not work the same as in MySQL

Let me explain: When I make a GROUP BY with MySQL, I can select fields that can not be grouped, as descriptions (varchars), and the result shows, of all the grouped values, the first one that I find. But now I find SQL Server and it tu...
asked by 26.04.2018 / 22:29
2
answers

Display record of a query one at a time

I need to do a function where I read one by one the records of a query like: select * from alumnos to be able to use the data one at a time, and to modify them one at a time. Therefore the idea was to put it in a while and go modifying...
asked by 31.07.2018 / 20:59
1
answer

remote connection to SQL Server 2017

I have a problem connecting remotely to SQL Server. I have the following: A Windows 2012 R2 server, with SSMS 2017, and with SQL Express Edition. A database, called Test, and the instance is SQLExpress. I also have remote access enabled,...
asked by 15.08.2018 / 19:05
1
answer

Query in SQL Server without "WHERE"

I am creating some reports and I really have no problem with the following query, as you can see it is simple and runs well but I realized that forget to put the " where " and it still works correctly; I had never seen anything like it b...
asked by 31.08.2018 / 20:04
3
answers

convert the result of a SQL query into an entire PHP variable

I want to store the result of an SQL query in a PHP variable but as an integer, this is my code: $maxnroviaje=mysql_query("SELECT MAX(NROVIAJE) from viajes"); $nroviajenew=mysql_fetch_assoc($maxnroviaje); and doing echo on those two variabl...
asked by 19.02.2018 / 02:45
1
answer

How would you look for a log of a sql database from java

I have a list that is filled in with the fields that I entered and then saved in the database, the problem is that when I select the button see user I want you to show me only the user information that I have selected from the list but I do not...
asked by 09.12.2017 / 23:53
1
answer

SQL Server 2008 - Modify the option: "Modify the first x rows"

Dear, I would like to know if I can edit the option that appears when I right click on a table in a database in sql server 2008 "Edit the first 'x' rows". What I would like to modify is to show me the rows ordered by one of the fields that I...
asked by 12.12.2017 / 11:55
2
answers

Problem with a query in MySQL

I have a problem with how to formulate a query to obtain the following: I have a table called TBL_BIT_TIPO_INGRESO where I store the types of economic income when registering some students. It is assumed that by default a text that says "FAMILY"...
asked by 30.01.2018 / 02:34