Questions tagged as 'mysql'

1
answer

Group two fields in the same table with mysql

I'm trying to set up a query, where I can print out the broker's name and the percentage of the sale pertaining to it. When grouping by name_corretor1, the field name_corretor2 does not group and vice versa, when grouping both the grouping is no...
asked by 08.04.2016 / 18:56
2
answers

How to delete the first line of a megapesado SQL file?

I have a "mega-heavy" SQL file that does not open either in sublime, in notepad or in gedit. I just need to delete the first line Use nome_database; to be able to import through the workbench or mysql command line in the terminal: mys...
asked by 18.04.2016 / 19:41
1
answer

Help to fill jTable

I'm filling a jtable with the birthdays that are registered in a database. public void jTablePop() { javax.swing.table.DefaultTableModel dtm2 = (javax.swing.table.DefaultTableModel)jTable1.getModel(); dtm2.setNumRows(0); //IS...
asked by 14.10.2015 / 18:03
1
answer

PHP Mysql - duplicate return

Well, my question is: How can I be checking to see if there is already such a value in the database? I have this code here that is already done the verification by the same SQL Query, that is if there is no such value it inserted and if it ex...
asked by 08.02.2016 / 18:15
1
answer

Sector questionnaire in php mysql

Here I see how many questions you have in each industry: SELECT a.area_id AS ID_AREA, a.area_desc AS AREA_DESC, count(sb.sub_area_cod) AS TOTAL FROM relacaoperg AS rp INNER JOIN area AS a ON rp.id_a...
asked by 16.02.2016 / 11:31
3
answers

2 COUNT within a SELECT with LEFT JOIN

I have two tables: Users: id | nome | email submissions: id | id_envia | id_recebe Every time a user sends a card (which goes by email) to another user, it marks this table, and every time it receives a tag as well. Doubt: I...
asked by 09.03.2016 / 20:52
0
answers

error in content registration [closed]

This is my first post so sorry if I do something wrong if I violate any rules please let me know. My doubts are as follows:  I am creating a "social network" and the posting code is not working I used the same code (with other variables obvio...
asked by 21.01.2016 / 13:07
1
answer

Rename multiple files with VB6 Bank data

I have a table with the following columns ID , Cod and Nome , I have a folder with hundreds of images, these images are with the beginning of the name equal to the column Cod of the table, Cod Imagem ao0001...
asked by 22.01.2016 / 13:47
1
answer

SQL Sum for periods

I'm having a question for the following query: In my sales table I would like to return the sum by period of a given product. Today I'm doing it this way: select YEAR(venda.data_venda) as Ano, venda.codprod_venda as CodigoProduto, produtos....
asked by 05.09.2015 / 21:56
0
answers

Comparison of Cities between Excerpts

Hello! I am developing a system that consists of registering parts by neighborhood or city. In this case that I am taking as an example, it includes only two excerpts, as I show in the figure. My question is, how to buy the snippets that are com...
asked by 02.09.2015 / 13:36