Posts by Leandro • 814 points
29 posts
-
-3
votes0
answers15
viewsQ: Breaking my sql formatting when creating artifact
I just hate when my sql Workbench breaks my query formatting when I create a view/Procedure. Shuffles everything and have to organize whenever you need to stir the query. There is an option in the…
mysql-workbenchasked Leandro 814 -
0
votes4
answers177
viewsA: Count(*) returning null
You can do it: SELECT ISNULL(SELECT COUNT(*) FROM USER_IND_COLUMNS WHERE TABLE_NAME = UPPER('TABLE') AND COLUMN_NAME IN (UPPER('ANO'),UPPER('MES'),UPPER('DIA'),UPPER('HORA')) GROUP BY INDEX_NAME…
-
1
votes2
answers133
viewsA: Catch last grouped Mysql record per year
SELECT ano_letivo, max(etapa_ensino_id) FROM estudantes_carga_horaria GROUP BY ano_letivo ORDER BY ano_letivo
-
2
votes2
answers194
viewsA: Table values being truncated
Change "," to "." because the field is of the decimal type (only accepts number and the separator to decimal places is the point) Example: insert into pessoas values ('1','Pedro Augusto da…
-
2
votes1
answer170
viewsA: Linq to sql with subquery
tabelaA.Where(t1 => tabelaB.Any(t2 => t2.id.equals(t1.id) && (t2.nome.equals("A1") || t2.nome.equals("A2") || t2.nome.equals("B3"))).ToList()
-
1
votes0
answers399
viewsQ: Alter table in giant table
I need to perform an alter table operation on several fields of a table and this table has more than one billion rows. One operation for each field takes approximately 2 hours and now imagines for…
-
1
votes3
answers8342
viewsA: SELECT in a table using NOT EXISTS SQL (SERVER 2012)
Missing to relate a row to another row of the other table. It should be something like that and assuming that the id is the key to each table: SELECT * FROM TB1 t1 WHERE NOT EXISTS(SELECT * FROM tb2…
-
1
votes0
answers120
viewsQ: Find out how many products I need to sell before reaching the goal
That’s a question that requires logical reasoning, but come on. How to do in SQL can be function, a way to find out how many products I need to sell to reach the goal. For example: I sold a certain…
-
2
votes1
answer352
viewsQ: Entityframework does not recognize Config Web transformation
In my solution C#, I use transformation Web.config to connect a specific data environment, but I’m having a problem with EntityFramework who can’t recognize string de conexão transformed, only…
-
3
votes2
answers957
viewsQ: How to compare set of numbers with other set?
How to mount query to compare if a set A of numbers is equal to another, of B, with the same numbers of set A, and so on. Example: Table data id conjunto numero ordem 1 1 1 1 2 1 12 2 3 1 4 3 4 1 6…
-
3
votes3
answers884
viewsQ: List of Exceptions
How to implement a class so that I can add an Exception to an Exception list. This class would be used for the case below, for example: In the validation method can return one or more errors, so…
-
2
votes2
answers2200
viewsQ: What is the difference between SVN and TFS?
I’ve always used SVN to read the artifacts but I’ve moved away from work and the company I’m working for uses TFS to do the versioning and I don’t know what this TFS does exactly. What’s the…
-
0
votes3
answers2241
viewsA: How to create nonexistent columns in a Datatable?
Matthew, I suggest you use the pivot table in your query. This function does exactly what you want, transforms rows into columns, and it is not necessary to make rebounds in your code c#.
-
1
votes3
answers5031
viewsA: Error formatting ZIP code
follows the validation of the zip code in JQUERY ----------HTML <div> <label for="cep">CEP: <input type="text" id="cep" ></label> </div> <p> <button…
javascriptanswered Leandro 814 -
1
votes2
answers261
viewsQ: Set the value of the input whose name has brackets
As described in the title, follow the example below: ---- HTML <form id="nameGenderForm"> <table id="teste"> <tr> <th >Name</th> <th >Gender</th>…
-
2
votes2
answers434
viewsA: 100 position array for 10x10 array
I managed to solve the problem: <!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var x= []; for (i=0; i< 100; i++) { x[i] = "X"; } x[23] = "Y"; x[88] =…
javascriptanswered Leandro 814 -
1
votes2
answers434
viewsQ: 100 position array for 10x10 array
I have a one-dimensional array of 100 positions and how to get me to draw a 10x10 matrix (table) using a loop for. <!DOCTYPE html> <html> <body> <p id="demo"></p>…
javascriptasked Leandro 814 -
0
votes1
answer1369
viewsQ: From the View how to get the Model in Partial View
In the View leading, Index.cshtml, carry a partial view where this has a model. How to make Index call this one model so that I can serialize and send to a action in the controller? Below is an…
-
1
votes1
answer223
viewsQ: Define model the two-dimensional Array type attribute
There is a way to create an attribute of type array two-dimensional no Model so you can use this attribute to mount a table in View. Example: No model define an attribute of type array…
-
4
votes3
answers337
views -
0
votes1
answer764
viewsQ: How to get value and id within TD?
I have three action links within the TD of a Table. How do I get (in Jquery) the value and id when clicking on one of the links? Follow the code below: var dados = [ ['Banana', '10,00'], ['Maça',…
-
4
votes2
answers257
viewsQ: Event click is lost on the next page in the pagination
I have developed a simple pagination page for my studies and am having a problem with the click event when I go to the next page. On the first page the event works but when I go to the next the…
-
3
votes2
answers92
viewsA: Problem with INNER JOIN
I think the mistake is here: (SELECT * FROM categorias_estabelecimentos WHERE categoria_slug = :categoria_slug) Only one field must return Soon it must be so: (SELECT ce.campo FROM…
-
1
votes2
answers144
viewsA: Is it redundant to use LIMIT in a QUERY whose ID is the primary key?
I never stopped to think about it but I think the best way to find out if it’s faster or not is to use a time measurement feature when running a query. See an example below, in the case using sql…
-
1
votes3
answers3234
viewsA: Browse data from 1 day to 3 days ago mysql
I’m not sure I got it right, but from what I understand query below takes the last 3 dates and you can determine which date return within these 3 days. SELECT * FROM (SELECT row_number() OVER (ORDER…
-
2
votes1
answer1864
viewsQ: How to show "wait, load data" using asynchronous programming?
How can I use asynchronous programming with Async and Await so that it appears in the middle of the grid "Wait for loading data" while searching for data in the database and fill in with Datatable…
-
0
votes1
answer472
views -
22
votes3
answers7874
viewsQ: ASP.NET MVC or Webapi?
What is the advantage of using MVC and Webapi (using Visual Studio and C#)? I think that developing in MVC is easier to assemble a form with validations, because just put special attributes for this…
-
4
votes1
answer1165
viewsQ: Using Data Annotations to validate fields from an HTML page and Web API
Someone has an example of how to create a field validation in an HTML page using Data Annotation, Web API and C#. In MVC with you, this is easily achieved by using Wizard when creating a View.…