Posts by R.Santos • 2,251 points
201 posts
-
0
votes0
answers140
viewsQ: How to perform a SELECT DISTINCT - H2
I need to perform a SELECT DISTINCTin the database H2 but the way I’m doing it’s not returning anything to me: SELECT DISTINCT lote FROM LotesEncerrados l ORDER BY l.lote ASC I did the same in the…
-
0
votes1
answer8478
viewsQ: Select most recent record from a given table - Postgresql
I need to select the most recent record of my Estoque case the column data be different, I managed as follows to bring the oldest when the dates are different: SELECT codigosuprimento, numeroserie,…
-
0
votes2
answers678
viewsQ: Convert String to Array - Java/Groovy
I need to convert a variable string in a array, I tried to do as follows, I have the variable string conteudoLote, where its value is: [["4","SCAB171301BF5","Vazio","Lexmark…
-
0
votes0
answers33
viewsQ: "Too Many errors" - Javascript
I’m getting the message from Too many errors in line 113 of my file Javascript however I can’t find any error in that file, my file is as follows: var x = 0; var data = new Date(); var dia =…
javascriptasked R.Santos 2,251 -
0
votes3
answers9910
viewsQ: Remove first and last character from a string
I need to remove the first and last character from a variable String, tried to use substring for this, but is giving the following error: String index out of range And I’m not finding a way to do…
-
1
votes2
answers34
viewsQ: Select items that do not contain in a second table
I need to select data from a table only when the codigo this table does not appear in a second table. Briefly this would be it. I have the table entregaitem with the following columns…
-
1
votes1
answer1113
viewsQ: Difference between INNER JOIN, JOIN and WHERE?
I need to perform a query that return me information according to a certain condition, I have always used the Where for not knowing if he could use another method. So what’s the difference between…
-
3
votes2
answers1903
viewsA: How to convert Lowercase String to UPPERCASE?
Use the function toUpperCase(). Thus: opcao=entrada.nextLine().toUpperCase()
-
0
votes2
answers1429
viewsQ: IF / ELSE condition on Expression in Jasperreports
I need to perform a field check expression in my report created in Jasperreports studio, my situation is as follows, I need to realize the following account: $F{quantidade}/($F{quinze}/15.0) But…
-
1
votes1
answer796
viewsQ: How to display decimal number - iReport
I’m having unexpected difficulty displaying decimal numbers in iReports, for example if my variable has the following account 180 / 180 it displays me correctly 1 but if it is 162/180 it displays me…
-
2
votes1
answer1510
viewsQ: Merge the output of two Select’s - Postgresql commands
My need is to merge the result of two select commands so that I get everything back at once, for example in this command: SELECT codigosuprimento, suprimento, count (codigosuprimento) quantidade,…
-
3
votes2
answers2800
viewsA: How to get the records from the last 15 days - Postgresql
After adapting what was found here my query was like this and I got what I needed: SELECT * FROM public.entrega where data >= CURRENT_DATE - 15 order by data desc;…
-
3
votes2
answers2800
viewsQ: How to get the records from the last 15 days - Postgresql
I have a table called Entrega where all deliveries made with their respective dates are stored, how can I bring only deliveries from the last 15 days? Doing so I can bring deliveries from the day 10…
-
3
votes1
answer417
viewsA: Perform calculation in SQL command
I figured out how to return what I need, I just needed to alter a part of the query, in the end she gets like this: SELECT codigosuprimento, suprimento, count (codigosuprimento) quantidadeAtual,…
-
2
votes1
answer417
viewsQ: Perform calculation in SQL command
I performed a command of select on my table estoque where I bring the supply model, your current amount and what is your minimum amount in stock, for that I made the query as follows: SELECT…
-
1
votes3
answers809
viewsQ: Link to *.exe download
I need to download a file *.exe via link on tag href, I did it this way: <a href="remoto.exe"><input type="button" id="botao" title="Suporte HSS" value="Suporte…
-
0
votes1
answer82
viewsQ: Merge the results of two SQL’s commands into H2
I created the following Query: SELECT s FROM SuprimentosPedidos s WHERE s.codigoModeloImpressora = :codigoModeloImpressora AND s.codigoEmpresa = :codigoEmpresa and s.prioridadeSaida = 1 ORDER BY…
-
5
votes1
answer556
viewsQ: Condition in Select - SQL
I have a table where we store the priorities of output of supplies per customer, for example: cliente | codigosuprimento | prioridade | quantidaestoque 1 | 500 | 1 | 20 1 | 501 | 2 | 10 1 | 502 | 3…
-
16
votes5
answers19971
viewsQ: Validate regular expression name and surname
I need to create a regular expression that validates whether the format of the user’s name and surname is valid, for example: Maria Silva | true Maria Silva | false Maria silva | false maria Silva |…
-
0
votes0
answers443
viewsQ: Export Mysql data to CSV file in UTF-8 format
I’m used to the tool Workbench to access data from my Mysql database, but when I try to export the returned data to a file *.CSV I am unable to export the same in the format UTF-8, but is exported…
-
3
votes1
answer368
viewsQ: Checklist and Dialog with external file - Shell Script
I need to use the Dialog making a Checklist from an external file, I have so far done the following: dialog --stdout --checklist "Contas de e-mail: " 0 0 0 \ while read line do $line "" on \ done…
-
3
votes2
answers126
viewsQ: Error opening form - Delphi
I have an application that was developed in Delphi7 and I need to make a change in a given form, but when trying to open this form to make these changes the following error window is displayed to…
-
1
votes0
answers70
viewsQ: How to save date (yyy-MM-dd) and time (hh:mm:ss) in Postgresql?
I need to store in the Postgresql database the date and time that a particular record has been changed or inserted, but when creating this column I was in doubt about which format to choose,…
-
1
votes1
answer65
viewsQ: Remove subArray from a Main Array
I have two main Arrays (listaInformacoesNota,listaInformacoesPedidosPostgreSQL) with N subArrays each, these subArrays have items in common and a different item only, I did the following to compare…
-
0
votes5
answers4863
viewsA: How to make a regex that ignores non-alphanumeric characters?
Use this regular expression: [0-9a-zA-Z] Test here
-
-1
votes1
answer739
viewsQ: Create Function to update column
I need to update a column according to the contents of the other two columns, for example, I have two tables, the table suprimentos and the table estoque, Table supplies codigoSuprimento…
-
8
votes3
answers46833
viewsA: How to rename the column name SQL Table
Just as @Maniero commented will depend on the database you are using, but for these three (Oracle, Postgresql and Mysql) it is as follows: Oracle ALTER TABLE T_CLASSE_SOCIAL RENAME COLUMN TESTE TO…
-
0
votes1
answer81
viewsQ: Function Postgresql
I need to create a Function() in my bank PostgreSQL so that whenever there is a movement of INSERT or UPDATE this function is activated in a given table through a TRIGGER so that in my log table are…
-
0
votes2
answers853
viewsA: COUNT in several tables
One way that could be done is also the following: SELECT COUNT(publications.id) as total1, COUNT(deejays.id) as total2 from publications, deejays
-
0
votes0
answers88
viewsQ: Error "in such file or directory" - Eclipse
I am developing a software on a prototype board, which is the ARMST32 - F411RE, for this I created in the software Stm32cubemx the following model: But when generating the algorithm and trying to…
-
-2
votes1
answer778
viewsQ: How to check how many days passed from a Javascript date
I need to check the amount of days that have passed since the day a task was created, for example, if I start a task today I get the following date back: 2017-08-30 11:38:52.168 I need to do a…
-
1
votes3
answers554
viewsQ: Extract Array Data in Javascript
I own a array with the working groups that the session user belongs to, for example if I write like this: return $data.teste02[0].group_id.name It returns me the first group that this user belongs…
-
0
votes1
answer42
viewsA: How to access the contents of this subArray?
The problem was the way I tried to access subArray’s content, I had missed the full path I needed to make available to access its content. Initially I had put so: {{teste02[0].name}} But before I…
-
0
votes1
answer42
viewsQ: How to access the contents of this subArray?
I can access the contents of an Array like this: {{teste02[0]}} And I get as return the following: {"assigned_date":"1969-12-31 21:00:00.000","user_id":"101","role_id":"101","group_id":…
-
1
votes2
answers189
viewsQ: Generate files with all permissions
I am generating *.csv files from this: BufferedWriter strW = new BufferedWriter(new FileWriter(caminhoCSV.toString())) However the generated files are only with read permission, how could you change…
-
2
votes1
answer1315
viewsQ: Change task time on Windows
I need to configure a Windows job to run every 30 seconds, but the task scheduler has a minimum time of 1 minute and if I try to change to (30 seconds || 0.5 minutes || 0.5 minutes) I always get the…
-
3
votes2
answers125
viewsQ: Doubt regarding Count in SQL command
I need to count the amount of supplies available in stock according to your codigoSuprimento, for this I created the following sql command: select count(codigosuprimento) quantidade,…
-
1
votes1
answer176
viewsA: Generated PDF file changes
With the help of @Gustavofragoso’s comment, I was able to find out why the files were being generated differently when the process was running localhost and when executed on Servidor de…
-
2
votes1
answer176
viewsQ: Generated PDF file changes
I developed a report in Jasperstudio which takes some information from the database and also some parameters that are passed via Inputs, when I am testing the application on my station, the PDF is…
-
0
votes0
answers44
viewsQ: Access data from Array
I have an Array that has the following items: [[362, SCAB171570FEC]] To display this I use the following expression: return $data.listaItensPedido.value; But I need for example to access only the…
-
2
votes1
answer552
viewsA: Convert base 10 to base 2
public void binario(int numero) { int d = numero; StringBuffer binario = new StringBuffer(); // guarda os dados while (d > 0) { int b = d % 2; binario.append(b); d = d >> 1; // é a divisão…
-
1
votes1
answer981
viewsQ: Report details are not displayed
I set up a report in Jasper Studio 5.6.0, and imported my generated *.jrxml file to the IDE where I am developing, but everything that is put in the session "Details" the report simply does not…
-
5
votes1
answer164
viewsQ: Return of SQL command
I need to select in my database all printers compatible with a selected supply, for example, the code supply 155 who is called 50FOZ00. I do the query below to select all compatible printers: SELECT…
-
-1
votes1
answer789
viewsQ: Create report with barcode
I need to create a report in Jasper Studio with barcode but I am not able to read the barcode that the report is generating, my doubt is, which barcode pattern I should use, and how should I…
-
1
votes3
answers1525
viewsQ: How to create an incremental Update sql command
I have a table Estoque where today there are already numerous rows of records already registered, how can I do an Incremental Update to fill a column that I added the table now? Produto | N_Serie |…
-
1
votes1
answer69
viewsQ: How to perform an SQL command that fills several lines
I have a table where there are several records of supplies, now will be implemented a column in this table where will be saved a label that facilitates to find these supplies in the stock, I have…
-
7
votes4
answers17451
viewsQ: How to check Postgresql logs?
I have a legacy database that when doing certain action in the system that has access to it, several tables are modified, I was able to identify at least 04 tables being changed. My question is…
-
1
votes2
answers75
viewsQ: Is it possible to do an Update this way?
I have two tables, the Table Impressoras is where is stored the data of the equipment, as model, patrimony, etc. And I have the table Impressora Local where the location of the printer is stored,…
-
0
votes1
answer693
viewsQ: Footer is not fixed at the bottom of the screen
I created a page where there will be a footer that should be fixed at the bottom of the page, when the page is started it has a total size and the footer works normally at the beginning: But I have…
-
1
votes1
answer6123
viewsQ: Add link to image by *.CSS file
I have a file *.css that I determined the position and size of the image I have in my header, it is possible to add a hyperlink to that image in the file itself *.css and then when I assign that…