Posts by John Diego • 1,067 points
27 posts
-
2
votes1
answer54
viewsQ: Videos with quality and the smallest size possible
I’ve seen websites putting up a video short to be displayed as if they were background of a div and it looks very beautiful ! Someone can guide you on how to compress to the maximum and the…
-
6
votes1
answer1251
viewsA: How to filter separate dates by day , month and year in Mysql
The problems are : 1) Compare string with number 2) year >= 2015 AND mes >= 3 AND day >= 3 , considering that both are integer is incorrect pq for example if we have the values (2016 , 2 ,…
-
3
votes2
answers1567
viewsA: Much interface query for many SQL server
Jhow has more than one way to solve his problem, one of them would be : select titulo from livros inner join livro_autor on livros.id = livro_autor.fk_livro inner join autor on autor.id =…
-
2
votes2
answers556
viewsA: Sql server - default
When you insert '' in the database , he NAY understands this as valor não informado and yes as string vazia . So in the varchar field it stores the empty string and in the date field it converts to…
-
4
votes1
answer373
viewsQ: How to check if there is scheduling in a time range?
I need to create an agenda where I allocate a service provider to work for a client. For example: Prestadordeservicos João will provide services to the customer condominium valley of the sun on the…
-
0
votes3
answers55
viewsA: Difficulty in formulating query
The problem was this: How I started the query from Parcel p and made a left Outer Join Parcel using p.cod_parcela the query returned all the records they had p.cod_parcela including those of other…
sql-server-2008answered John Diego 1,067 -
0
votes3
answers55
viewsQ: Difficulty in formulating query
In a system there are plots registrations . The users can classificar as plots for familyDeParcela each of which user has its own familyDeParcela. As plots are common to all. I have 4 tables: User…
sql-server-2008asked John Diego 1,067 -
11
votes3
answers2753
viewsQ: Solution to scan documents by browser
I want users to digitalizem documentos straight from browser and then up to server. I found APIS who do this but all get paid and the licenses dearest ! Can someone present a solution ? Even if the…
-
5
votes2
answers8268
viewsA: Select with the day of the week in Portuguese
You can use the function weekday(date) to know the day of the week and the solution will be similar to what you did for the month . She considers the day of the week as a whole of 0 - 6 starting on…
-
4
votes1
answer2049
viewsA: How to do INSERT in three tables with Stored Procedure?
There are several ways ! In one PROCEDURE you can create your logic . Let me give you an example, but I don’t understand exactly what you want to do and I don’t have your table structure With the…
-
1
votes2
answers1403
viewsA: Compare data sql
You can use BETWEEN and the function DATE_SUB Your Where looks like this : where DAT_REPOT_REALZ between DATE_SUB(now(), interval 7 day) and now() Follows a fiddle for example . Regarding Count, you…
-
2
votes2
answers8408
viewsQ: How to concatenate the results of a RELATION into a SELECT?
Having the tables PRODUTO , CATEGORIA whereas a CATEGORY may have several PRODUCTS, would like a select list in a column nvarchar all the PRODUCT NAME of a CATEGORY. Something like: select concat(…
-
1
votes3
answers884
viewsA: List of Exceptions
You create the list like any other... Following example: fiddle List<Exception> le = new List<Exception>(); try { try{ throw new Exception(" except 1"); } catch(Exception e) { le.Add(e);…
-
4
votes3
answers675
viewsA: Why can’t I declare an attribute using the var keyword?
The first problem is that implicit type variables have to be immediately initialized(and not valid = null). It’s like @Maniero said Usar var não significa que pode usar qualquer tipo, significa…
-
4
votes1
answer652
viewsA: Concatenate select result
The problem is inUNION and in modeling The UNION server to join distinct results of 2 or more SELECTS which may be totally independent, and these results will be listed in different lines just…
-
2
votes1
answer482
viewsA: overflow overflow padding
I edited your fiddle but since I never touched it I don’t know if it will appear to you the change I made . here the link What would you do next to solve your problem : I would put the messages in a…
-
3
votes3
answers3002
viewsA: How do I try to make a site compatible with major browsers?
Gilmar , the issue of maintaining compatibility with all browsers is very wide. About how browsers work: When you type an address in the navigation bar, click a button that sends a form,links... you…
-
4
votes1
answer50
viewsA: SQL query doubt
The function of the operator UNION is to return the DISTINCT RESULTS of 2 SELECTS or more ( to list also the repeated results is used UNION ALL ) An example of use would be to list all cities in a…
sqlanswered John Diego 1,067 -
1
votes2
answers1730
viewsA: How to update dataGridView by clicking a button?
This way you ensure that every change in the Dataset is automatically applied to the Datagrid : ... // 1)Carregar seu DataSet // 2) Criar um BindingSource BindingSource bs = new BindingSource(); //…
-
5
votes1
answer603
viewsA: Start application only if a url is working (Online)
Has yes Peeta ! //Aqui você cria a requisição WebRequest request = WebRequest.Create("http://www.sitepratestar.com.br"); try{ //Envia a requisição e recebe uma resposta , não recebendo é lançada uma…
c#answered John Diego 1,067 -
4
votes1
answer70
viewsA: Select checking a condition
To get this result you can use CASE Example: SELECT TOP 10 TBL.PRODUTO , COUNT(TBL.ID) AS QTD , SUM(CASE WHEN TBL.VALORGANHO <= 0 THEN TBL.VALORGANHO ELSE 0 END) AS PERDAGERADA , SUM(CASE WHEN…
-
2
votes2
answers173
viewsA: Strange Comic Book Behavior - Too Many Records
You must join the tables using JOINS and not by WHERE the 5 main types of JOIN are : INNER JOIN Returns a row for each occurrence of a given relation between 2 tables example : select tabela1.* ,…
-
1
votes1
answer178
viewsA: Error when publishing Site
Possibly this will solve your problem : 1)Seleciona no IIS o pool do seu site 2)Clica com o botao direito 3)Seleciona Advanced Settings 4)Seleciona TRUE em Enable 32-bit Applications. If the item 4)…
-
3
votes5
answers100
viewsA: Copy a word from a column to the end
Randrade explained well and gave the solution for a SELECT , but if you really want to change and not simply select, I believe that a correct code is as follows: update tabela set nome =…
-
0
votes1
answer121
viewsQ: How to improve Asp.net Membership security?
Is there any way to protect that cookie that is evident when logging into a website that uses Asp.net Membership ? I know that just copy it to "clone" the login session and this way is very…
-
2
votes1
answer814
viewsA: Is there any way to merge multiple SELECTS into just one query?
I think this query solves your problem, you can join them using Internet as it has the user reference ( Whereas user is unique ) SELECT cadastro.nome, cadastro.sobrenome, cadastro.usuario,…
-
4
votes3
answers171
viewsQ: How to simplify this comparison?
I often fall into the following situation : For example in c#: string variavel= "x"; boolean b = (variavel == "a" || variavel == "d" ||.....|| variavel== "y"); Is there any way to simplify something…
c#asked John Diego 1,067