Questions tagged as 'sql'

0
answers

PIVOT Help - SELECT SQL [closed]

I have a table with the data: unidade tipo valor 1 2 10,00 1 3 15,00 2 2 16,00 3 3 10,00 3 1 25,00 I need to make a select pivot that swallows me unidade tipo1 tipo2 tipo3...
asked by 16.09.2016 / 16:58
1
answer

ResultSet first does not work

I'm creating a Java application in Eclipse. I'm having trouble making the First, Previous, Next, and Last buttons work. I'm stuck on the First button because, I believe, the difference is just the .first() , .next() , .previ...
asked by 23.09.2016 / 15:24
1
answer

Insert an ID in SQL + PHP

I am making a form where the user inserts the data and the same one receives the confirmation along with an ID record in php with sql, I am just not getting this final confirmation along with the id, can anyone help me? I know that mysql is l...
asked by 09.09.2016 / 15:50
1
answer

Merging notifications

I want to make a system of notifications that group together when they are the same type, as those of Facebook. For now I have the table with the following columns: user_id (person receiving notification), icon (Generally the profile p...
asked by 11.09.2016 / 23:11
1
answer

Group values from different columns into one, separated by commas

I have the following select : SELECT DISTINCT ORGAO, UNIDADE FROM TESTE Where the following result is generated: Órgao Unidade 1 2 1 3 1 4 1 5 4 records of the same organ are returned, but with different units. Wh...
asked by 01.09.2016 / 23:13
0
answers

How to know the index number in a multidimensional array? [closed]

Information: Rooms: 25; Teachers: 4; Q02, Q03, Q04: A student in a class ranked the teacher from 0 to 10. From these numbers, an average was generated. There is a select with the list of teachers, and when one is selected, I need to displa...
asked by 21.09.2016 / 17:28
0
answers

How to create a dynamic query with Left Join?

How can I make this query dynamic, it is already working only that it only lists one semester of each year and wanted it to list two, type when I select the first it lists the first and when I request the second it lists the second. public f...
asked by 29.08.2016 / 13:43
1
answer

Calculate the mean values where fields are equal

I have a table, in mysql , which receives some data regarding evaluations. How can I average these evaluations directly in query , based on the question? I tried in many ways, including researching here, and I could not. SELECT perg.pergunta...
asked by 30.08.2016 / 16:18
0
answers

How to create certificate for server in SQL Server?

I'm creating an application that uses SQL Server as the DB manager. My problem is to make a secure connection between DB and application, so I need to create a certificate on the server within SQL to be able to use as a ha...
asked by 03.10.2016 / 21:06