Questions tagged as 'query'

2
answers

Delay in loading some records

Hello! We work with SugarCrm. Who does not know Sugarcrm is a CRM made in mysql and php that uses the Zend framework. We used the opensource version and did some customization. I'm having trouble where some customer records take too long to l...
asked by 18.05.2017 / 14:18
1
answer

Compare Date End of first record with Start Date of Second

Hello. I'm having trouble crafting a SELECT that checks if the End Date of the first record of the query is greater than the start date of the second. The database in question is for notes, and for some reason, some notes have a start da...
asked by 01.06.2017 / 22:35
0
answers

Find columns from two tables that are not directly related

I have 5 tables: cliente , produto , compra , compra_produto and fornecedor . And the following relationships: compra (fk_cliente) compra_produto (fk_compra) compra_produto (fk_produto) produto (fk_fornecedor...
asked by 23.04.2017 / 02:20
0
answers

Connect By on SqlServer

I have a query that works in Oracle but is not working in SQL Server. The table I have saved has a start date and end date on the same line, but when it goes from one day to the next, I needed to look at how much time I had in a day Dt_I...
asked by 25.04.2017 / 15:49
1
answer

how to convert my object into a string?

I have done a function to insert the data into the database, however as I am using classes, I have to insert an object of class into the database that will contain the data of the person in question, except that the form being passed the object...
asked by 05.04.2017 / 19:47
1
answer

Adding decimal values mysql

I made a query that adds a decimal field, but I'm having a problem, because when I put the group by t1.id_sell clause it lists the sales but no longer adds correctly and without the correct sum clause but only returns one line. query:...
asked by 30.03.2017 / 18:09
2
answers

SQL Query VBA Excel

Good afternoon! I have a problem with an Access query via form. The form is from the Excel vba, which connects to the database. The full code is below. This is the button code. Clicking it validates which of the two buttons is marked...
asked by 28.03.2017 / 16:58
1
answer

Media Calculation between SQL Selects

Good afternoon. Please help me    Syntax error   Msg 102, Level 15, State 1, Line 2087   Incorrect syntax near 'TAB'. --TARIFAS --Calcular Média Tarifada BEGIN TRY DROP TABLE #TARIFASINDMETRO END TRY BEGIN CATCH END CATCH SELECT...
asked by 27.03.2017 / 21:56
0
answers

Truncate numbers in a Mysql column

I want to leave all the numbers that are inserted in my bank with a maximum of 1 decimal place after the comma without rounding Ex: 3.2567 = 3.2 I want to know if I can truncate the column all of the database (already tried but I could not), usi...
asked by 31.03.2017 / 19:51
2
answers

SQL Query in Excel VBA

Good morning! First of all I would like to say that I understand almost nothing of Visual Basic and that everything I have learned so far has been in the race in forums. So if that is too simple to solve, forgive me. Now to the problem. I...
asked by 27.03.2017 / 17:10