Posts by Roger Oliveira • 682 points
14 posts
-
0
votes2
answers1048
viewsA: SQL Replace when some variable contains semicolons
How are you calling this SQL? If it’s in c# you can mount the string like this: var sql = string.Format(@"UPDATE tabela SET estilo = REPLACE (estilo, '{0}', '{1}') where estilo LIKE '%class="{2}';",…
-
3
votes1
answer63
viewsA: Would it be possible to convert a form to pdf?
Try the code below if you need more references or examples try the link below: Here: https://community.oracle.com/thread/1164777?start=0&tstart=0 And here:…
javaanswered Roger Oliveira 682 -
0
votes2
answers210
viewsA: Get older value from another table
Opa, recommend you to use a column DATAHORA together with DATA, TIME separated, in which case the test below works as you want: CREATE TABLE #Produtos ( DATAHORA DateTime, PRODUTO int, ESTOQUE int )…
-
9
votes2
answers238
viewsQ: How to create operators in C#?
How to create an operator in C#? For example, There are operators like: * multiplicacao / divisao % percentual The question is: How can I create my own operator? For example: 100 ~ 2 = 200.8 Where ~…
-
3
votes1
answer46
viewsA: Search does not work correctly when using JOIN
Ever tried to use NOT IN? This command would filter c.Email not in (select co.Email from Contratos co) WHERE c.Email NOT IN ( SELECT co.Email from Contratos co )…
mysqlanswered Roger Oliveira 682 -
3
votes2
answers314
viewsA: Convert to R$nomenclature
Cara uses this function in javascript: Number.prototype.formatMoney = function(c, d, t){ var n = this, c = isNaN(c = Math.abs(c)) ? 2 : c, d = d == undefined ? "." : d, t = t == undefined ? "," : t,…
javascriptanswered Roger Oliveira 682 -
21
votes2
answers48433
viewsQ: Using WITH AS command in Sql Server
I have seen this example below, I would like to know how this command With [name] AS works on Sql Server, and what are its uses compared to tables in memory or SubQueries, in terms of performance.…
sql-serverasked Roger Oliveira 682 -
2
votes1
answer781
viewsA: Connection pool with ADO.NET and Sqlconnection Dispose, what is correct to do?
Dude I have a very optimized and good class that I use in the projects here, using Generics you can even choose which type of Data Access Class you want to use, I did even performance tests: private…
-
2
votes1
answer3337
viewsA: Send data to controller via Json
I’ve had this problem, pass the parameter as a string JSON: In your Ajax use this: var dataJson = JSON.stringify(squirrel); $.ajax({ type: 'POST', url: 'Gravar', data: { modelo: dataJson },…
-
1
votes1
answer2043
viewsQ: What is the difference between OUTER APPLY and INNER JOIN in Sql Server?
What’s the difference between OUTER APPLY and INNER JOIN in the Sql Server? I know how the LEFT/RIGHT/INNER JOIN works but I came across the OUTER APPLY I read it but I didn’t fully understand it,…
-
1
votes3
answers382
viewsA: Design Standard for Filters
I pass the filters as parameters in the Stored Procedure using this sql: @parametro is null or campo = @parametro Once you pass null in the parameter he will ignore, then simply pass parameters to…
-
1
votes1
answer228
viewsA: Accordion in Windows Form?
Uses this component of Accordion p/ Windows Forms it works very well: http://www.codeproject.com/Articles/416521/Easy-WinForms-Accordion-Control…
-
1
votes2
answers3761
viewsA: How to select all id’s except one?
Hey, do it like this: Select * From Utilizadores Where id_ut <> 1;
sqlanswered Roger Oliveira 682 -
1
votes2
answers490
viewsA: Doubts about the use of delegates
A delegate is a type of reference that can be used to encapsulate a named or anonymous method. Delegates are similar to function pointers in C++; however, delegates are heavily typed and secure. For…