Questions tagged as 'select'

1
answer

Select a row where a column has an element of a CSV

I have a table in the database with the following structure: +---------+---------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------+---------+------+-----+---------+--------------...
asked by 15.03.2017 / 18:35
2
answers

Return the shortest date within the Select

I have the following table: CREATE TABLE [dbo].[Crm_man]( [id] [int] IDENTITY(1,1) NOT NULL, [nCRM] [int] NULL, [cliente_CRM] [int] NULL, [item_CRM] [int] NULL, [qnt_CRM] [int] NULL, [descri_CRM] [varchar](max) NULL, [descri_NF] [varchar](max)...
asked by 12.05.2017 / 18:59
2
answers

MYSQL: sort by specific rows within SELECT

I've been trying to resolve this for about three days and found the answer nowhere. I have a table in the database where I need to do a SELECT on all products but they need to be sorted according to the average between date X and date X, a ba...
asked by 04.03.2017 / 18:11
1
answer

Difference between normal avg and using case when in MySQL

I have two queries that are supposed to give the same result, however it is not happening. Can someone explain to me why it does not show the same result? Query that returns the expected result: SELECT id, ROUND(AVG(SinalGPS), 4...
asked by 10.02.2017 / 18:29
1
answer

Show alert when select select

I have the following code $query = mysql_query("SELECT id, nome, situacao FROM clientes ORDER BY nome") or print mysql_error() <select class="js-example-basic-single form-control" id="cliente" name="cliente"> <option value="Seleci...
asked by 17.03.2017 / 19:32
1
answer

Display datepicker according to selection

Good afternoon, I'm breaking my head to display the date as per the user's selection. Example: select 01 - the "From / To" select 02 - Only "To" select 03 - Only "From" select 04 - No dates appear I've created an array, with the dataInitia...
asked by 09.01.2017 / 15:35
2
answers

How to compare 2 Cells in different columns - SQL

I need to make a SELECT looking for some data with the proviso that only if the value of a certain cell is different from another cell . Ex: +-----------+------+------+ | Descricao | Val1 | Val2 | +-----------+------+---...
asked by 25.01.2017 / 20:38
2
answers

Popular select a partit from another select using python and django

Good night, I'm new to the forum, and I started doing a small project with python and django. I'm trying to fill a select according to the selected option in another. But since I'm a beginner, I do not know how to do that. <div class="form-...
asked by 27.02.2017 / 00:10
1
answer

How could I add an ICONE inside a SELECT in HAML

Hello, I would like to add icons (from source, such as bootstrap for example) inside a select field in HAML, at first I'm doing so, would that be possible? I thought about using the bootstrap list-dropdown as a palette, but it did not work either...
asked by 27.09.2016 / 14:22
1
answer

How to select greater number of records based on another SQL table

I have an IMOVEIS table ID | Tipo | endereço 1 | Casa | Rua teste 2 | Casa | Rua teste 3 | Apartamento | Rua teste And a sales table id | ID_do imovel 1 | 1 2 | 2 I need to know based on the sales chart, wh...
asked by 26.09.2016 / 14:21