Posts by EmanuelF • 408 points
29 posts
-
2
votes0
answers155
viewsQ: SSIS error: Cannot load script for Execution
Executing the data load generates the following error: "Cannot load script for Execution". The data load executes a Script Task. In this Script find a CSV file, in which it takes the date of the…
-
-3
votes1
answer1782
viewsQ: Sum of SQL accumulated value
I have a stock value and need to display the information of the stock movement based on invoice. Table Drive Cod | Tipo | NumeroNota | Quantidade | DataEmissao | Material 1 | S | 12312 | 1 |…
sql-serverasked EmanuelF 408 -
0
votes1
answer65
viewsA: How to perform 1 position offset SQL query?
For those who use SQL Server have two very interesting functions to be used in this type of query. They are LEAD and LAG. In SQL Server it stores the last and next line of the query and through…
-
0
votes1
answer619
viewsQ: Update dynamic table with connection to a Stored Procedure using Macro VBA
I aim to bring the data from a Stored Procedure to a spreadsheet in Excel. This Stored Procedure is using two parameters for the query. Excel 2013 SQL Server What do I have I set up a macro that…
-
0
votes4
answers3251
viewsA: Select first name? - Select in bank
You can use the NVL SELECT NVL(SUBSTR(NOMEJOGADOR, 0, INSTR(NOMEJOGADOR, ',')-1), NOMEJOGADOR) AS output FROM TABELAJOGADOR If you are using Oracle10g+ you can use Regex which is simpler: SELECT…
-
1
votes1
answer4491
viewsA: Safe update error using stored Procedure in MYSQL
The safa update error comes from the need to have a WHERE that uses the KEY column in the PRIMARY KEY case of the table to be changed. This comes as standard from the Workbench, you can see more…
-
0
votes3
answers1155
viewsA: Bring more than one line into a Subquery Sql Server
Simply use INNER JOIN. Follow the example in SQL Fiddle HERE SELECT T1.*, T2.Motivo AS MotivoT2, T2.Total AS TotalT2 FROM T1 INNER JOIN T2 ON T2.PF = T1.PF…
-
5
votes2
answers35301
viewsA: IF WITHIN A SELECT
You can use CASE WHEN SELECT CASE WHEN @VL_RET_IRRF > 10 THEN 10 ELSE @VL_RET_IRRF END AS Result FROM Tabela In the SQL above checks whether the @VL_RET_IRRF is less than 10 if it is shows 10…
-
1
votes1
answer97
viewsA: Problem saving
You are saving an entity, which has a relationship with an entity that has changed but has not been saved before. If this is the case, you have two options: Save the other entity before saving this…
-
1
votes1
answer1565
viewsQ: Bring the first line based on an SQL date
One more challenge stopped in my hands. I need help in my query. What I need: I want to know who are the people who have had account releases on a given day, where I need to show the value and…
-
0
votes1
answer83
viewsA: Pull a return from a JS function to C#
This is a simple Jquery example for sending Cpf. var cpf = 000000000000 $("button").click(function () { $.ajax({ url: "/Home/PostJson", //local para onde vai ser enviado type: "POST", //forma de…
-
0
votes1
answer48
viewsA: Change automatic database field after a given time
Procedure is the solution to your problem. Develop your Store Procedure: Barium syntax: CREATE [OR REPLACE] PROCEDURE procedure_nome [ (parameter [,parameter]) ] IS [declaration_section] BEGIN…
-
0
votes2
answers66
viewsA: Select with Join does not return results
I adapted a query: select * from livro as l where l.id not in (select fk_livro_id from passador) It is made a subselect that brings all the fk_livros_id therefore, I compare with the id table of…
-
0
votes1
answer372
viewsA: Identify the change of record in a time table?
For this question the solution is to check the current line with the previous line, thus has the LAG function for versions from SQL Server 2012. This being the solution: SELECT id, nome,…
-
0
votes1
answer372
viewsQ: Identify the change of record in a time table?
I am working on a table that keeps the history of some people, and I need to identify and display the lines that have been modified in a certain column. See example: --Tabela HistSituacaoPessoa id |…
-
2
votes2
answers428
viewsQ: How to make a query that brings only the count of an uninterrupted sequence?
I want the counting of uninterrupted values of the current year backwards, until the first occurs NULL. Example: Several people make donations to an NGO annually and this is stored in a database,…
-
0
votes1
answer735
views -
0
votes0
answers275
viewsQ: Convert NVARCHAR to NUMERIC
I have a table that has a VALUE column, but the column is in nvarchar, this column nvarchar does not let me do the correct formatting in the report I am using select. I can do the conversion in SQL…
-
0
votes1
answer81
viewsA: Fixing a Textbox on each page in SSRS
I found the solution I needed. In the body of the report I added a List within that List I added a Table. Keeping the List selected, in the field below Row Groups I changed the properties Group…
reporting-servicesanswered EmanuelF 408 -
0
votes1
answer81
viewsQ: Fixing a Textbox on each page in SSRS
Hello. I’m developing a report that contains the person’s name and a table of her information. It is arranged so that the name is on top of the table. Nome: Fulano Dado1 | Dado2 | Dado3…
reporting-servicesasked EmanuelF 408 -
-1
votes3
answers924
viewsA: Format String
In the case of the above code {pvp} {otherName} are not mentioned in the Replaces. We can simplify this code. String user = "João"; String mensagem = "MODERADOR" + user + "> uma mensagem";…
-
1
votes2
answers76
viewsA: Java File Writing Difference
In a direct way, Path is more modern and does everything that File does in a better way. In new projects it is recommended to use Path. For more information at that link.…
-
1
votes2
answers560
viewsA: Save reports to a table or run a database query?
I recommend leaving the report via SQL query. Once your report can have start and end date filters, the user could access it at any time and make the necessary comparisons. Regarding queries, try to…
-
0
votes1
answer486
viewsA: validate image input file jquery Multiple 4 ways
Hello 1) You can find your solution here 2) You can search further on google by searching how to validate file extensions. Here’s another one solution 3) Solution here 4) In Javascript format: var…
-
1
votes2
answers1235
viewsA: How to display mouse inactivity element?
Look at this example: $(function() { timeout = setTimeout(function() { window.location.href = "http://answall.com"; }, 120000); }); $(document).on('mousemove', function() { if (timeout !== null) {…
-
1
votes1
answer2251
viewsA: List AD groups via a query
I found the solution to my problem. (&(objectClass=group)(memberOF=CN=NomeView,OU=NomedaPasta,DC=dominio,DC=com,DC=br) Remembering that it is necessary to have knowledge of the structure in…
-
1
votes1
answer2251
viewsQ: List AD groups via a query
I’m looking for a direct query to Adctive Directory. I need to know which groups Views are linked, the same goes for users. The structure, for you to understand better: is created a group where is…
-
4
votes1
answer4693
viewsQ: There is a way to know the name of the Database Server
There is an sql command that can inform the server and the database in which select is running? I am available for more details
-
9
votes3
answers49197
viewsQ: How to use the output of a select to mount another?
I built a select that concatenates a string. I want to use the result of this select in another select SELECT * FROM (SELECT CONCAT('caminho da tabela') AS caminho FROM tabela) AS result Can you do…