Questions tagged as 'select'

2
answers

MySQL - Create temporary table according to dynamic SELECT

Is there any way to create a temporary table according to a select with columns created dynamically, as shown in the examples below? ex: SELECT idCentroCusto, 'Dez/14', 'Jan/15', 'Fev/15', 'Mar/15', totalAnual or SELECT idCentroCusto,...
asked by 03.03.2015 / 14:57
2
answers

Search for two MySQL tables in php [closed]

I have two tables that are: Registration Dorsal (id auto_increment primary key); Name; Team; Classification Location (id auto_increment primary key); Dorsal (foreign key); and the following code in PHP : $result =...
asked by 18.06.2015 / 12:40
2
answers

PHP function in_array ()

I'm developing a system that takes the category IDs that are stored in the database, separated by , , I'm using explode , turning them into a array and then I'm using the array_rand() to sort only one value of this arra...
asked by 20.11.2014 / 18:06
1
answer

Trigger for a Select

I would like to know if it is possible to execute a Trigger when a SELECT is performed in a certain table, for example: CREATE TABLE IF NOT EXISTS "Conversa" ( "idConversa" SERIAL NOT NULL, "idEmissorConversa" INT NOT NULL, "idReceptorCo...
asked by 11.10.2014 / 15:59
1
answer

Referencing OPTION in javascript

Next: I have to enter the name and price and status data, depending on the state it calculates the icms. I wanted to make it depending on the OPTION that I select it calculate automatically, with the if's and else's. but I'm not sure if I'm refe...
asked by 10.11.2018 / 21:41
1
answer

Do SELECT with average user ratings

Well, I'm developing a project and it has the list of people, I would like to list them based on the average of the evaluation, I tried to do with INNER JOIN and AVG, but with them they will not show users who have just registered. The SELECT th...
asked by 08.11.2018 / 13:02
1
answer

Filtering Power Pivot Table by ListBox

This code: link Make the selection in the ListBox ... and Filter driven by a button .. as described in the link ... But if the PivotTable is created by Power Pivot .. This code does not apply ... You can do this same job in this creat...
asked by 07.08.2018 / 21:47
1
answer

Pre-populating table with MySQL query

Does not bring what I want, can someone tell me what I'm missing looking at the code? <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Sistema de busca interna com PHP/MySQ...
asked by 17.08.2018 / 14:47
2
answers

Add a column with data in Varchar2 format [duplicate]

I want to add the sum of the Value column that is of type Varchar2, I know that to use SUM () I have to use GROUP BY as well, but I can not do the summation. I do not know what fields I have to put in GROUP BY. SELECT DISTINCT z.sales_office...
asked by 26.09.2018 / 14:06
2
answers

Query in SQL SERVER 2017

I need to perform a query in SQL Server 2017, where I need to bring the following information: Codigo do chamado , Data Abertura , Interação , Analista , UltimaInteração (would be the last interaction date) and...
asked by 02.08.2018 / 13:58