Questions tagged as 'where'

2
answers

Search for a string anywhere in List C #

Good afternoon. I would like to know how to search for a given string anywhere in the list. Ex .: string "123". It can be in Pessoa.id , Pessoa.Nome , Endereco.id , Endereco.Rua or Endereco.CEP ; List of People...
asked by 13.10.2016 / 22:16
1
answer

Where it takes a long time

I'm using Laravel 5.6 My model is normal <?php namespace App; use Illuminate\Database\Eloquent\Model; class MyTable extends Model { protected $table = 'myTable'; public $timestamps = false; } I'm trying to make a simple qu...
asked by 25.09.2018 / 22:22
2
answers

How to separate a letter from a character in SQL?

I have a variable of type character varying (17) and need to separate one of the characters, for example the third letter, and use it to filter. SELECT * FROM fnord WHERE terceira(illuminati) = "a"     
asked by 02.08.2018 / 14:43
1
answer

SQL WHERE returns unwanted values

SELECT x, y, z, f , g , h FROM torrents INNER JOIN w ON w = x WHERE y = '2' OR y = '7' AND f = '1' AND h < 4294967296 I set the f = '1' in where so that it returns only the values with f = 1 so it returns values wi...
asked by 18.02.2018 / 03:25
1
answer

Use CASE in a WHERE clause

I need to use a condition within a filter parameter in a report. Basically the rule is determined by a vachar field that the value of it is 'T' or 'P'. I tried a solution like below but it did not work very well. The rule is, if the field is...
asked by 11.04.2018 / 20:19
2
answers

Add AND and OR to Where de list

I have a list in C# and the search code is currently like this: filter = lst.Where(s => s.Contains(num.Text) ).Take(3).ToList(); The lst list is based on a list of phone numbers and contact names, for example: 123456789$nome1 9...
asked by 13.06.2016 / 20:53
1
answer

How to check route parameters in Laravel and only accept specific parameters?

I would like to know how to create a function that validates the parameter received from a route in Laravel , for example, has a route: Route::get('fotos/{user_id}'); where users can only access where user_id is equal to the id...
asked by 31.03.2017 / 15:05
1
answer

Doubt referring to IN in Oracle

I'm setting up a query and I came up with an issue. My query looks like this: SELECT BASI_030.NIVEL_ESTRUTURA NIVEL, BASI_030.REFERENCIA GRUPO, BASI_030.DESCR_REFERENCIA, BASI_030.CONTA_ESTOQUE, BASI_020.TIPO_PRO...
asked by 07.07.2017 / 15:31
3
answers

Query error by date

In my application I have a query by date, below is a snippet of the script tblacesso.HorarioSaida BETWEEN '2017-06-17 00:00:00' AND '2017-06-17 23:59:59' But he is not selecting the data of the day in question, below is an image in the data...
asked by 19.06.2017 / 14:55
1
answer

How to resolve error ORA-01795 (maximum number of expressions) in Codeigniter

I am developing a report in Codeigniter, however my select contains a filter that can have more than 1000 expressions in my where_in and then it returns me the error: ORA-01795: o número máximo de expressões em uma lista é de 1000. I...
asked by 25.10.2017 / 12:09