Questions tagged as 'sql'

1
answer

Query error per month

I need to make it so that the user chooses the month to calculate ESTDIA. On the red and bold line. When I leave the :MES and execute of the error and already leave defined example V.OUTUBRO o SELECT runs without error...
asked by 10.11.2014 / 16:06
1
answer

Returning more than one variable in JQuery / PHP

Being objective, my problem is this: I have a form in PHP / HTML and I'm using a field auto-fill via Jquery. This form brings up the last numbers wagered by the user and remakes the wager with this numbers automatically without it needing to...
asked by 19.02.2017 / 00:29
2
answers

SQL Group same ID with another condition

I believe this is a somewhat specific question, because I do not find anything related yet. I have a table named contas_produtos , which is a NxN relation between the contas and the produtos tables. The table has the...
asked by 14.02.2017 / 14:46
3
answers

Find greater sum value and show id

Talk about it, all right? I have this table EMPLOYEE_PROJECT Table +--------------+-------------+-------+ | rg_empregado | num_projeto | horas | +--------------+-------------+-------+ | 20202020 | 5 | 10 | +---------...
asked by 13.04.2016 / 16:22
1
answer

Backup mysql by java

Good afternoon, I have a cmd that correctly backs up my database, but when running in java it does not open the cmd in the expected way, it follows the code: package sistemaMiriam.backup; import java.io.IOException; public class MySQLBackup...
asked by 28.04.2016 / 19:58
2
answers

How to do a direct calculation in the database

I would like to calculate a teacher's salary based on the discipline load it teaches, I created a Java algorithm for it, but I can not pass it on to SQL Algorithm in Java public double calcSalario() { //Calcula o salário do professor sw...
asked by 02.07.2017 / 07:16
6
answers

How to get distance given the coordinates using SQL?

I'm making a function in php , in which, given a GPS coordinate, it will search the database for registered locations, which are not necessarily fixed, within a certain distance. My question is: how do I calculate the distance between the co...
asked by 13.03.2014 / 13:19
2
answers

Calculating hours with php

How to calculate the time that the person entered and the time that the person left less the interval and display the total hours he gave? For example if a guy made the following hours: 07:30 12:00 13:30 17:00 would have to display: 8 hour...
asked by 03.08.2016 / 15:14
2
answers

Group views in SQL Oracle

I have a small block of logical reasoning. I have a table (table1) organized this way, but would need to return the query as table2 just below. Can anyone help me?     
asked by 01.12.2016 / 13:35
2
answers

How to migrate data from a Postgres table to Oracle? [closed]

NOTE: In short, the database that was in postgres was migrated to oracle, but a table that is not automatically migrated by the system was missing. I want to know what is the best way to do this if you can do it manually or use some tool betw...
asked by 26.01.2017 / 20:21