Questions tagged as 'sql'

1
answer

Error: table name specified more than once

I created a column included in the app table, it works to record the purchase date of the application and I will have to update the old records with the date of user creation. I have done a query to solve the problem, but postgreSQL has an error...
asked by 24.02.2015 / 20:35
1
answer

Query that selects the last line of each device?

I have 3 tables in my DB: CREATE TABLE IF NOT EXISTS 'local' ( 'codigo' int(11) NOT NULL AUTO_INCREMENT, 'IMEI' varchar(15) NOT NULL, 'latitude' decimal(10,6) NOT NULL, 'longitude' decimal(10,6) NOT NULL, 'datetime' datetime NOT NULL...
asked by 18.07.2014 / 21:06
1
answer

Change language in the database during a query

Is it possible to change the language of the database only while executing an insert query? I am having problems with date conversion due to their formation, the Bank expects dd-mm-yyyy, but in the query is yyy-mm-dd.     
asked by 18.07.2014 / 21:23
1
answer

Java check, display the values registered in the MySQL database

I need help I'm doing a game in java and I need all the records and files and etc of the players in my table but I can not connect to the database much less check and display the values Ps: the Sun.java tutorial from DriverConnector did not h...
asked by 25.07.2014 / 14:13
1
answer

How to total the days according to a period?

How to total the days according to a period? Example: +--------------+--------------+--------+----------+ | data_ini | data_fim | codfun | qtd_dias | +--------------+--------------+--------+----------+ | '2014-01-15' | '2014-01-31'...
asked by 24.09.2014 / 17:16
1
answer

How to calculate the average of a query result mysql? [duplicate]

How do I get the field "count (t2.id_atend) TOTAL_ATENDIMENTO "and calculate the mean of it in PHP? SELECT t3.desc_serv, t3.nm_serv, t1.nm_usu, count(t2.id_atend) TOTAL_ATENDIMENTO FROM usuarios t1 INNER JOIN historico_atendimen...
asked by 30.04.2014 / 18:07
1
answer

Execute a query when clicking the result of another query [closed]

I have the following column structure from my database: account_id, name and appearance. Image: link I had the following code before: <font size="3">Por favor digite o nome do personagem que deseja Resetar a Aparencia</font> &...
asked by 02.04.2015 / 13:01
2
answers

Does LINQ to Entities not recognize the 'Boolean Like?

I'm having this error when trying to do one with query using LINQ to SQL after making the suggested changes: {SELECT 'Extent1'.'idcliente', 'Extent1'.'nome', 'Extent1'.'pai', 'Extent1'.'mae', 'Extent1'.'informacao', 'Extent1'.'datanascime...
asked by 06.04.2015 / 16:59
1
answer

How to use the current date in a procedure?

Good evening guys. I need help. For you to understand, I'm trying to run a system procedure that asks me for some variables that I can pass them in a fixed way, but one is date. in case the date needs to be of the current day, as I want to sched...
asked by 03.04.2015 / 03:13
1
answer

Should I track the status of a system with a single or multiple tables? [closed]

My question is somewhat conceptual and allows for a variety of interpretations. I am responsible for a system that uses status in several modules. Charge status, order status, payment status, etc. For status group there is a different table,...
asked by 04.04.2014 / 19:26