Questions tagged as 'sql-select'

1
answer

"Linked Server" with MySQL

DBMS: SQL SERVER 2014 + MySQL 5.5 What are the SELECT, INSERT, and UPDATE syntax instead of using the "OPENQUERY" function, when connecting through the SQL Server Linked Server, connecting to MySQL?     
asked by 06.06.2014 / 14:17
1
answer

Do not repeat data when doing a SELECT in MySql

What I want is this. I am working on a system, which has registered an employee and days in which he worked on the month. So far so good, but it happens that in some cases, the employee has 2 or more records in the same month, for example, I reg...
asked by 19.05.2014 / 21:59
1
answer

How to show result between 3 tables?

I have these three tables; table_1 |---------------------| | ID1 | name | |---------------------| | 1 | 'xxxxx' | | 2 | 'xxxxxx' | | 3 | 'xxxxxxxx' | | 4 | 'xxxxxx' | |...
asked by 21.03.2016 / 15:21
1
answer

Convert column to row [duplicate]

This is the select of my table, the query I'm using follows in the image below: It brings the normal result, but I wanted it to bring it this way: | Id_Unica | Pixel | Inch | Quantity | 18 1080p 15 2 Can it be personal?...
asked by 13.11.2014 / 14:17
3
answers

Specifying fields I do not want in MySQL

In MySQL, when we are going to make a SELECT , we can usually specify each field we want to return. SELECT id, nome FROM usuarios However, let's imagine a scenario where I have 50 columns in a table and I did not want the senha...
asked by 09.02.2015 / 15:04
3
answers

Adding result values in mysql

I'm servicing a bank and I'm having trouble making a select . Structure of table descontos_taxas : id | value | customer | data_created My Scenario: This table stores both fees and discounts in the same table. The rates are posit...
asked by 14.05.2014 / 22:40
1
answer

SELECT command denied to user

   Error: SELECT command denied to user 'bank'@'xxx.xx.xx.xx' for table ' This error only happens in my hosting, it is running locally perfectly, I am querying 2 databases in a single query using: 'banco'.'table' ... Is it user permiss...
asked by 05.07.2014 / 03:40
2
answers

Check in a table if a user is not registered

Colleagues, I have a table called salas_usuarios, this table contains all the users registered in the rooms and another table called users, where I store the users. But I would like to check which users are not registered in a certain room. T...
asked by 30.06.2016 / 23:22
3
answers

Problems with SELECT RIGHT JOIN

I have two tables, A and B. In Table A, I have a column with machine names (Cortadeira, Baler, Packer and Rewinder) and in the other column some causes that made them stop Lack of Electric Power, Coil Replacement, etc). In Table B , I have a...
asked by 07.03.2018 / 12:29
1
answer

Select grouping by average per hour and sum per day

How can I return a select the daily sum of the value column, being that before adding I have to do an average per hour? My table receives the "value" once per second, I need to average the hourly value of that value and return the sum of these a...
asked by 26.10.2017 / 23:56