Posts by Jovani • 366 points
45 posts
-
0
votes1
answer18
viewsA: How to make row values return as columns in a select in Oracle?
I got it with select: SELECT b."Nome", SUM(case when a."Funcionalidade" = 128 then 1 else 0 end) ProdutoA, SUM(case when a."Funcionalidade" = 4 then 1 else 0 end) ProdutoB, SUM(case when…
-
0
votes1
answer18
viewsQ: How to make row values return as columns in a select in Oracle?
The select I made is returning conforms example below: Select: SELECT Count(*) AS total,b."Nome",a."Funcionalidade", DECODE(a."Funcionalida", 128, 'ProdutoA', 4, 'ProdutoB', 512, 'ProdutoC' ) tipo…
-
0
votes1
answer73
viewsA: How to fix ORA error - invalid weekday?
Solution: Use Portuguese abbreviated days of the week when creating the query in Java. **If run directly in the database, it works with abbreviations in English. SELECT analog,DEVTYP, trunc(data),…
-
0
votes1
answer73
viewsQ: How to fix ORA error - invalid weekday?
When I run the direct query in Oracle returns correct, but when I do via Intelij/java, returns the error: ORA-01846: it is not a valid day of the week. SELECT analog,DEVTYP, trunc(data), Max(dis)dis…
-
-2
votes1
answer168
viewsQ: How to separate and identify objects within an Ajax request, with data coming from Servlet via Json?
How do I separate the objects inside the Ajax? The Servlet sends a list of objects to Ajax, but I can’t separate them inside the Ajax to be able to pick up an attribute from a specific object, for…
-
0
votes1
answer79
viewsA: Java, when I use CRTL+V, does the question mark appear in front of the text?
I decided to delete the first character as below: String retornoDoMetodoPaste = retornoDoMetodoPaste.substring(1);
-
0
votes1
answer79
viewsQ: Java, when I use CRTL+V, does the question mark appear in front of the text?
I made a class that will fetch a text in a file .TXT which is saved in UTF-8 format, and record in Clipboard for me to paste with CRTL+V in a field of another system. The problem is that when I use…
-
0
votes1
answer45
viewsA: Formatting graphs in Excel
1º You need to define an area in excel for the data that will be used as source for the chart; 2º You need to create a Module in VBA that connects with the Mysql database, select the data you want…
-
1
votes1
answer109
viewsA: Access - Update in table without using VBA module
Do you want to write the excel data in Access? If so below follows an example of a method that receives excel data as parameters(can be implemented in a looping) and inserts into Access. Sub…
-
0
votes2
answers4216
viewsA: Function MAX only 1 (one) record on Oracle
Try it this way: SELECT MAX(ID), TICKET_ID, QUEUE_ID FROM TICKET_HISTORY WHERE HISTORY_TYPE_ID = 27 AND STATE_ID = 2 AND TICKET_ID = 1290 ORDER BY TICKET_ID DESC LIMIT 1;…
-
0
votes0
answers90
viewsQ: While iteration with date and time
How to organize the method JAVA below, to get the output as in the example. I have an array of times (would be input and output), and I need to associate these times to a date range, while I was…
-
1
votes1
answer504
viewsQ: Document.Write with variable does not print
Why the window.document.write(valores) nor the $("body").append(valores) do not print on screen? <!DOCTYPE html> <html> <head> <link rel="stylesheet"…
-
0
votes1
answer456
views -
1
votes1
answer35
viewsA: How else to do it?
After researching a lot I discovered that the problem of document.write: was due to two google links that needed to be updated. What I used to use: <script type="text/javascript"…
-
0
votes1
answer32
viewsA: Page only brings the data the first time it is loaded
After researching much discovered, the problem is related to Document.write that link <script type="text/javascript" src="http://www.google.com/jsapi"></script> and…
-
0
votes1
answer35
viewsQ: How else to do it?
I am getting this error when I try to upload data to the page via Ajax. There is another way to send Json objects from Servlet to JSP without using document.write? error: "A parser-blockingis…
-
0
votes1
answer32
viewsQ: Page only brings the data the first time it is loaded
Why does the page only load the data once? After loading, if I update the page in the browser, it no longer brings the Getvalues data. I am using Servlet and JSP. <html> <head>…
-
0
votes1
answer131
views -
1
votes1
answer107
viewsQ: Simulate Database Update with Select
How I could make a select in the table below (Mysql) to solve the method (Java)? re data is_folga 10 01/01/2017 0 10 02/01/2017 0 10 03/01/2017 0 10 04/01/2017 0 10 05/01/2017 1 10 06/01/2017 1 10…
-
1
votes1
answer2907
viewsQ: Select to count quantity per column
How I make a select that returns the amount of equipment repeating, and the first and last date of these records? Equipamento | Data | Causa | B 01/01/2017 x B 03/04/2017 Y A 05/01/2017 Y A…
-
1
votes3
answers601
viewsQ: Java method that returns difference in hours
Why is the method below returning -1? It should return the difference in hours between two dates. public int diferencaHoras(String h1, String h2) throws ParseException{ DateFormat df = new…
-
0
votes3
answers1806
views -
2
votes1
answer1322
viewsQ: Select grouping by average hour and sum per day
How can I return in a select the daily sum of the value column, Since before adding up I have to average an hour? My table receives the "value" once a second, I need to make the average per hour of…
-
0
votes1
answer37
viewsA: Error after 100 AJAX requests
I solved the problem, it was a Servlet method that returned a Resultset and did not close the connection to Mysql.
-
0
votes1
answer37
viewsQ: Error after 100 AJAX requests
I have the function below that makes a request every second to the Mysql database and updates a DIV on the page. But after about 100 requests the "THINK ME" database blocks and returns "An error…
-
-3
votes1
answer62
viewsQ: Java "per unit" logic
How can it be a method to return the following: Knowing that 220 is equivalent to 0.3275 and that with each addition of 0.0049 in the value of 0.3275, it will increase in one unit the 220, or with…
-
4
votes1
answer132
viewsA: Sort select by date
(SELECT * FROM mensagens WHERE de = '2' && para = '1') UNION (SELECT * FROM mensagens WHERE de = '1' && para = '2') order by data
-
1
votes1
answer108
viewsQ: Select hard with date
I’m unable to do the following:how to return the time in minutes or hours that a certain WORTH occurred in the table below? Example: how long did the WORTH greater than "23" on 01/05/2017? and if…
-
0
votes1
answer387
viewsA: Pass and receive data to Servlet in the same AJAX Function
I found the answer, follow below: function UpdateGrafico(){ $(function () { //--------------------- //aqui preciso enviar uma data para o servlet realizar um select $.ajax({ data: varival: "valor1",…
-
0
votes1
answer387
viewsQ: Pass and receive data to Servlet in the same AJAX Function
Do you have any way to send parameter to Servlet and receive a json in the same AJAX Function? Example of what I need: function UpdateGrafico(){ $(function () { //--------------------- //aqui…
-
0
votes1
answer83
viewsA: Pass JSP date to Servlet
function UpdateGrafico(){ document.getElementById("loading").style.display = "block"; var queryObject=""; var queryObjectLen=""; var processed_json = new Array(); var processed_temp = new Array();…
-
0
votes1
answer83
viewsQ: Pass JSP date to Servlet
I have a Datepicker bootstrap as below, and I have a button that must pass the date selected in datepicker to the Servlet that will use this date as parameter for a mysql search. How can I pass this…
-
0
votes1
answer184
viewsQ: MYSQL average per minute
Hello, in the table below, you have to do a select that returns the following: select the average current per minute between day x and day y and on return display the day and minutes? I have a…
-
0
votes0
answers20
viewsQ: Jsp instead of Servlet
I did a lot of research, but it wasn’t very clear to me. Why can’t I use JSP pages to connect to Database (Mysql for example) and return this data by an Ajax function for example, to another JSP…
-
0
votes2
answers842
viewsQ: Average per hour Mysql
Hello, I wonder if you could return only the averages per hour of a table as below: id | valor | timestamp | 1 | 5.4 | 2017-4-20 18:00 | 2 | 3 | 2017-4-20 18:01 | 3 | 2.8 | 2017-4-20 18:40 | 4 | 2 |…
-
1
votes0
answers775
viewsQ: Upload Mysql Google Chart data
Can someone help me? I can’t load the Mysql data in Google Chart...if I use this same code, but in the graphic "Pie", it works, but in line it doesn’t... it draws the chart but not with data...…
-
0
votes1
answer1050
viewsQ: Mysql Web related error
Hello, I am trying to connect a java class with a Mysql BD from the db4free.net host but is returning the error below: SQLException: java.sql.SQLException: java.lang.ClassCastException:…
-
0
votes1
answer491
viewsQ: Mysql in Java Desktop applications for multiple establishments
Hello, if I make a Java Desktop application with a Mysql database, which will be delivered to several establishments to use, what about the database? Do you have any suggestions? The application, I…
-
0
votes0
answers17
viewsQ: Access JSP application from the web
I make some small applications with Javascript, HTML that I can leave on a computer running in the company where I work, and everyone from the internal network can access them by the address…
-
1
votes2
answers550
viewsQ: Null value showing zero MS Access
I need to set a field in Access to Null, through SQL, but after setting this field, it gets the value Zero and not Null. Due to a business rule, I need this field to be NULL and not Zero. The field…
-
0
votes2
answers555
viewsQ: Select in Mysql by skipping simple quotes
Hello How can I use this select and skip value with simple quotation mark? . . .st.executeQuery("select * from tabela_A where id = uc"); rs = st.getResultSet(); while (rs.next()) { texto =…
-
2
votes1
answer415
views -
0
votes0
answers98
viewsQ: Connect JSP to ACCESS database
Hello, I am trying to connect a JSP class with ACCESS but is returning the following error: "java.lang.Classnotfoundexception: sun.jdbc.odbc.Jdbcodbcdriver" someone knows how to fix it? <%@ page…
javascriptasked Jovani 366 -
5
votes2
answers476
viewsQ: How to pass parameters to an array in javascript?
How could I dynamically pass the information to the array down below? Example: I have a 40 coordinates listing in a text file, for example, or in a database Access, how do I pass these coordinates…
javascriptasked Jovani 366 -
0
votes2
answers318
viewsQ: Java Routine Inside Loop Repeat
I have a Java method that sends an email with an attached doc, and is working properly. But this method takes about 50 seconds running the entire sending process. But now I will need to run it…