Posts by Thiago Alessandro • 641 points
27 posts
-
4
votes2
answers213
viewsQ: How to filter only the last day of each month?
How can I filter a query bringing the result by the last day of each month, in SQL Server 2012? I tried the EOMONTH, I think due to the version. SELECT E8_FILIAL, E8_AGENCIA, E8_CONTA, E8_DTSALAT,…
-
1
votes2
answers48
viewsQ: Apply condition depending on value
In the script below, I need to use a condition only if the field is filled (line is commented in script below). If not, this condition should not be part of the query. Is there any way to do this…
-
5
votes3
answers1003
viewsQ: How to make a select within a condition?
How can I create a script in SQL where a SELECT, and as the result of a column of this first, performs a certain condition of another table? example: select * from tabela as t SE t.saldo = 0 entao…
-
0
votes2
answers3720
viewsQ: How to align radio button and label with Bootstrap 3.x?
How to align the radio button with the label, using the Bootstrap 3.x? I tried several ways, but the "misalignment" remains. radio{ width:15px; } <script…
-
1
votes2
answers64
viewsQ: How to add up the amount of records in which the penultimate record enters the Where?
I need a query, in MYSQL, that checks the penultimate record and that this record is equal to a certain value, and that counts the amount of records found. Ex: penultimate record is John’s. I need…
-
0
votes2
answers5013
viewsQ: How to add two columns?
I have 2 subselects, in SQL, that bring 2 different information, with the sum data. How to add the 2 "sums" and bring in a new column, or a single column? CASE WHEN sd3.D3_UM = 'PC' THEN (SELECT…
-
1
votes1
answer703
viewsQ: Add cases to a query
I need to create a query that adds up to 2 cases, but I’m not getting it the way I did. Case the field D3_UM = 'PC', he must add the field D3_QTSEGUM. Case the field D3_UM <> 'PC', he must add…
-
3
votes2
answers2319
viewsQ: How to use like in a comparison of fields in different tables?
How can I use the LIKE for a comparison of two different table fields? I need to compare the first 5 characters of each field. I tried with SUBSTRING and with LEFT, however, the performance gets…
-
3
votes2
answers6454
viewsQ: How to use Sum with subquery
How can I use the sum with a subquery inside? I tried many ways, but I couldn’t. When I try to put the sum shortly after the select main, message appears that I cannot use aggregation function with…
-
1
votes0
answers353
viewsQ: How to join 3 queries of quantities of different records?
I need to unite 3 darlings with different results and quantities of records in a single query, using the Where end of script as Where main for all darlings. How can I do this? I tried with the…
-
1
votes2
answers140
viewsQ: Problem with IN condition in sub-select
I have the following problem; I’m trying to do some research and include the value of WHERE major in a sub-select, but the result is always reported as 0, and there are records. Part of query that…
-
0
votes0
answers94
viewsQ: SQL - AVG with vendor alias and grouping
I need to create a query that calculates the average of a vendor delivery "score". It follows query, and in sequence, explanation of the fields: SELECT distinct C7_FILIAL, CASE WHEN C7_FILIAL =…
-
1
votes1
answer187
viewsQ: Average values where fields are equal
I have a table, in bank mysql, that receives some data regarding evaluations. How can I calculate the average of these evaluations directly on query, based on the question? I tried several ways,…
-
1
votes3
answers17426
viewsQ: How to pass javascript variable value to php?
How can I move to a variable php the value of a select, whenever a different option is selected. I tried as below, but returns me [Object Htmlselectelement]…
-
2
votes2
answers2233
viewsA: How to make Join of 2 tables without repeating data?
I changed INNER JOIN to include more relationships and it worked correctly. SELECT sr7.R7_FILIAL, sr7.R7_MAT, sr7.R7_DATA, sr7.R7_DESCFUN, sr3.R3_VALOR, sr3.R3_FILIAL FROM SR7010 AS sr7 INNER JOIN…
-
2
votes2
answers2233
viewsQ: How to make Join of 2 tables without repeating data?
I have 2 tables, a call SR7010 and another call SR3010. The primary key of the two is the field R7_MAT and R3_MAT. The query I’m trying to execute is this: SELECT R7_FILIAL, R7_MAT, R7_DESCFUN,…
-
3
votes1
answer815
viewsQ: How to change tab(Pill) through navigation button?
How to create button to change tab(Pill)? I have tried in some ways, but I have not succeeded in anything. In one case, I got it, but only switch to the 2nd tab, then it’s like he’s out of action.…
-
7
votes1
answer4727
viewsQ: How to display asterisk in fields with required css?
I have a form with some required fields and some not. How can I automatically insert an asterisk on the label of each field with required through css? <div class="form-group col-md-4">…
-
0
votes2
answers422
viewsQ: Send form as active tab
How I could submit a form according to the active Bootstrap tab, ignoring the validation of the unselected tab? Example: I have an "A" tab with an "A1" form and some fields with required, and a "B"…
-
3
votes3
answers37
viewsQ: Problem adding a date to an array index
I’m passing a date inside an index of a Array. As the looping is being performed, this Array is being fed. The index is also generated through this looping. However, when printing the index, it…
-
7
votes1
answer11081
viewsQ: Remove duplicate elements in Array
I’m getting an array by JSON, and using the array_unique to remove duplicated values, however, is displaying the following error: <b>Notice</b>: Array to string conversion in…
-
3
votes1
answer79
viewsQ: Cluster difficulty and Where clause in Mysql
I need to search the database for the last 4 most recent records, the column being exr_exa_id is in agreement with the informed Ids, and exr_exa_id may not be duplicated. I tried to group in some…
-
2
votes4
answers966
viewsA: hyperlink mailto on button
In Javascript and HTML, the information will be available to be viewed via source code. You would need to use some other language (PHP, for example), and pass the information via POST.…
-
2
votes1
answer178
viewsA: Mysql html text encoding error
Your problem is in the collate and Charset. If the charset is Latin1, wear your leotard latin1_swedish_ci If the charset is UTF8, wear your leotard utf8_general_ci You can change using the commands:…
mysqlanswered Thiago Alessandro 641 -
0
votes1
answer982
viewsA: Fix Bootstrap Column
You can try adding the attribute "Fixed" in the div Ex: <div class="col3"></div> <div class="col9 fixed"></div>
-
0
votes6
answers4502
viewsA: How to use two CSS attributes at the same time?
You can put a ; and put the next attribute, however, it is not recommended to put the styles inside the tag itself. As already mentioned, put inside the tags <style>/*Estilos…
-
4
votes4
answers243
viewsQ: Script making many improper requests
I am in the following dilemma, which may be simple for many here, but as a beginner, I am going through a great difficulty in a system that I am supporting... By clicking a button, a script which…