Questions tagged as 'query'

2
answers

How to use two checkboxes in a C # mvc view to choose the type of query?

Controller.cs public ActionResult pesquisarCliente(string _codigo) { var r = db.Pedido.AsQueryable(); if (!string.IsNullOrEmpty(_codigo)) { r = r.Where(n => n.Cliente...
asked by 17.09.2017 / 16:14
1
answer

Separate values from a multi select into columns

On my system, I have a multi select as they may come in the image below: AndIdoanexportofthisvariableinthisselectSELECTREPLACE(p.Argautor,',',';')ASArgautorFROMjud_ProcessospLEFTJOINjud_ComarcascONp.ComarcaId=c.ComarcaIdLEFTJOINjud_Municipio...
asked by 26.09.2017 / 14:58
1
answer

Graphical query handling via javascript [closed]

Good afternoon, I have a query on my system where it generates a graph. Inthefirstcaptionofthegraphitislikeundefined,Iwastryingtoredomyqueryonlyitwasnotcomingwiththesamevalues.Iwantedtoremovetheundefinedoptionthatisinmycaptionleaveonlythelastth...
asked by 18.09.2017 / 20:45
2
answers

Adds WITH query within another query - SQL Server

People, like adding the query below as a subquery. Query with WITH: WITH dias AS( SELECT CAST('2017-06-26' AS DATE) AS dia UNION ALL SELECT DATEADD(DAY, 1, d.dia) FROM dias d WHERE d.dia < '2017-06-30' ) SELECT CONVERT(VARC...
asked by 18.08.2017 / 20:01
2
answers

order by in oracle subquerys

RESOLVED I decided to create a view equal to my work order table plus it was ordered by the team and the priority, and I kept the above query by changing only the table of the subquery that I placed the view I created, so I do not have to wor...
asked by 23.08.2017 / 15:04
2
answers

Bringing a sum in SQLite Android

I have a problem in developing an App, following, I have a list of all donation data in the database, and in this activity I created a TextView to receive the full value of those donations, however, I have some problems: 1st the value field in t...
asked by 23.08.2017 / 03:23
3
answers

Get only 1 of each journey

Well, I have a table designated by tabelajornadas . In it, I have several records, and in which I have the column jornada , which is of type int . At the same time, they contain several records with the same number in the...
asked by 25.08.2017 / 15:04
0
answers

Help to optimize an index in mysql

I have a relationship website and for years I've tried to optimize this query. Almost every day the site hangs because of it. User table structure CREATE TABLE 'usuarios' ( 'id' bigint(20) NOT NULL, 'nome' varchar(25) CHARACTER SET utf8...
asked by 26.07.2017 / 07:48
1
answer

Divide date range in weeks

It would have some simple way of extracting the weeks given a range of dates, for example: start date: 07/01/2017 end date: 7/30/2017 Given the dates above how could you automate the extraction of the weeks contained in this range? E...
asked by 20.07.2017 / 18:12
0
answers

How to add variable in the query as a column? [closed]

How do I add the $pesq variable as the column of a query (not search) query? $pesq = mysqli_real_escape_string($dbcon , $_POST['pesq']); $pesquisa = mysqli_real_escape_string($dbcon , $_POST['pesquisa']); $sql = "SELECT * FROM tbcliente...
asked by 06.07.2017 / 17:44