Questions tagged as 'query'

2
answers

Insert 2 primary key of 2 tables in a third one that goes to relational

I have 2 tables. Company Table and Table Categories Both tables would not be related initially, but then we need to create a third table. Table category x company. The query must dump all companies and all categories to the third tab...
asked by 21.09.2017 / 18:59
1
answer

How to remove percentage in sql server

this is my query porcentaje = isnull(( select sum(x.valor)*100/(select sum(ccc.Valor) from CuentasPorCobrar ccc) from CuentaCorriente x where x.Detalle like 'Pago%'...
asked by 28.09.2017 / 18:21
2
answers

Error with button and table in PHP

No table open in php, image where error: Can you help me find the prooblema? When I try to open the table, I'll open the code, it does not make it the table I need, which was already working, I just added the $ result query to validate it...
asked by 08.09.2017 / 02:07
2
answers

Select query with SUM java

I need to make an inquiry by counting the number of hours in a field, this is my code. the field is an integer, since only a number of 2,3,4 hours is saved, it is not required to be a time type. public Object findBySum(Integer iduser){...
asked by 26.09.2017 / 22:12
1
answer

How can I make this inquiry?

I need to count the number of spreadsheets in a range in table A , and I require that only count the number of spreadsheets that are TIPO CORRECTIVO , which is find in table B , I have the following query but I get a r...
asked by 23.08.2017 / 14:40
2
answers

Index out of range when performing an update

When executing the statement: ps.setString(i ,text[i].getText()); I get the following error:    java.sql.SQLException Parameter index out of range (1 > number of   parameters, which is 0); This is the code: void Guardar (JTabl...
asked by 02.08.2017 / 02:14
1
answer

db2_exec special characters

I try to make a query to a database db2 and there are some columns with "Ñ" that are primary keys, so I must include them. The problem is created when executing db2_exec    Warning: db2_exec (): Statement Execute Failed in Deploy_Tabla.php   ...
asked by 17.07.2017 / 16:37
2
answers

mysql show records per hour

Greetings I need to group records per hour in a range (from 7 to 16) in mysql but I also need to show the hours where there is no record if there was at 7, 8, 9 but at 10 there are no records I need to leave the time and maybe a zero if there ar...
asked by 17.06.2017 / 02:23
1
answer

Query linq to get the rows with the oldest date in a data set

ID (self-generated number) IDFK (self-generated number) but can be repeated DATE (TO DATE) ... ID IDFK FECHA 1 1 1/1/1999 2 1 1/2/1999 3 2 1/3/1999 4 3 1/2/1999 5 4 1/5/1999 6 4 1/3/1999 7 1 1/4/1999 Ok, think that the highest ID do...
asked by 29.05.2017 / 20:32
1
answer

error when consulting a table with name something $ something

I have a query similar to this: select * from nombre$tabla where valor = 1; If I run this on my bd engine it works (Oracle), but when I run this from PHP it does not return records, the code in php is sending it like this: $query = "selec...
asked by 17.05.2017 / 00:24