Questions tagged as 'sql'

1
answer

Display return of a SQL query in Excel

My question is divided into two parts. The first one, it is possible to perform SQL command by Excel, as I need to display certain information from my MySQL database in a table in Excel. Note: I do not want to connect via ODBC, I need the q...
asked by 07.04.2017 / 14:37
1
answer

Select some data from different tables

Rebuilding the programmer here, I'm having trouble with SQL and I'm asking for help. I have two tables called orcamentos and clientes . I need to select all fields from the orcamentos table and only the nome...
asked by 05.04.2017 / 13:37
1
answer

Import Excell XLS Worksheet and write to MySQL database

PROBLEM: I have some spreadsheets where I get some information, which is updated every 6 hours. The main difficulty is when I need to compare some information between the last 2.3 worksheets for example, since I need to open one and th...
asked by 20.03.2017 / 13:52
1
answer

Select from different tables [closed]

How to do a select from different tables? Type, check if there is value in one, if not, check the other.     
asked by 09.04.2017 / 20:46
1
answer

How to get the current date minus two years in mysql?

I need to show in a query some items between the current date of the time in question and two years before.     
asked by 10.05.2017 / 20:38
1
answer

Import decimal with comma

In SQL Server, I am trying to execute a SELECT in a * .csv file as follows: SELECT * FROM OPENROWSET(BULK 'C:\Minha_Pasta\meu_arquivo.csv', FORMATFILE = 'C:\Minha_Pasta\format.xml') AS Contents meu_arquivo.csv...
asked by 23.02.2017 / 22:26
2
answers

Get data using join in two table 1 for many

Good morning, I need to perform a select of two tables that are related 1 to many: Table 1: Products Table 2: Price group I need to get all prices in the price group table, which can be 1 or more. In my case of the select below it ev...
asked by 20.02.2017 / 15:04
2
answers

Execute SQL command in terminal

I'm trying to run sql command through the windows prompt but I do not know the initial settings to do this. Can anyone tell me? Detail: It must be in the windows terminal.     
asked by 16.02.2017 / 14:16
1
answer

Query to separate records

Good afternoon guys, I'm having a hard time doing a query. Have the following table Iwouldliketomakeaquerythatshowswhatandhowmanystatus_telephonyhadbyphoneanddate,thencreateatablewithallphonesthathadmorethan5OR+status"MACHINE" OR "INVALID...
asked by 14.02.2017 / 20:17
1
answer

Doubt in consultation with EntityFramework

How do I make this query with EntityFramework ? with lambda or linq SELECT t0051_id_medicamento, t0100_lote, SUM(t0100_qtde) FROM t0100_historico GROUP BY t0051_id_medicamento, t0100_lote;     
asked by 26.01.2017 / 23:36