Questions tagged as 'sql-select'

1
answer

Return amount of dependents per employee

I need to select the Plaque, Employee Name, and Dependent Amount for each Employee, but the result of that query is showing the number of dependents for the first Employee only, / p> Note: If you remove the WHERE clause, the query shows...
asked by 03.11.2018 / 20:36
1
answer

Create a three-table Viewer

How to create a mysql view with 3 tables the following structure being cliente |id_cliente |nome_cliente produto |id_produto |nome_produto |valor_produto pedido |id_pedido |id_produto |id_cliente I would like to create...
asked by 07.06.2016 / 21:15
2
answers

Mysql Help to Return the Unavailable Days to Schedule Time

I have 2 mysql tables that represent the unavailable days for scheduling: holidays table: id, day (date), name Special_days table : id, day (date), will_work (boolean) At the end I need to select the unavailable days which are the hol...
asked by 15.05.2018 / 14:15
2
answers

I have the id of the state and the city, and now? [closed]

Hello, in a classified site with PHP and MySQL I made through Ajax the insertion of the state and the city. When selecting the state, the id is passed and it sends to the file getcidade.php that makes the select and returns the r...
asked by 24.08.2016 / 03:23
1
answer

How to display a result using 2 selects

I have two tables, Products and Orders. I need to create a combobox for products and when the user chooses a product, the page has to display all requests related to the product, if I choose another product have to change the requests....
asked by 14.06.2016 / 17:48
1
answer

DOUBT INTO A SELECT - SQL

I have basically this relationships: Iwouldliketogetthevalueofthe"im_fab_model" attribute of the "tblPrinter" table from the code of the "is_cod_printer" attribute of the table "tblPrinterPrinter", can anyone help me? For now I have this sel...
asked by 09.07.2016 / 20:53
3
answers

Select Oracle returning many times the same result

My select works and returns the data I need, but it is returning more than 6000 times the same result. How do I return the result in only 01 line. NOTE: There is only one result for this code sq_transação , there is no possibility of...
asked by 05.01.2016 / 22:38
1
answer

Page Calendar By Week

I am developing a Specific Agenda for a client but I'm not sure how to page the calendar per week. The schedule works much more I do not know how to page now date_default_timezone_set('America/Sao_Paulo'); $data1 = date('d/m/Y'); $hora1 = date...
asked by 14.01.2015 / 02:34
1
answer

MySQL Query - Trasnposition

I have the following query: SELECT despesa.codRequisicao, despesa.histDespesa, despesa.despesaPassagem, despesa.despesaTaxi, despesa.despesaHotel, despesa.despesaRefeicao, despesa.despesaOutros FROM...
asked by 22.10.2014 / 13:32
1
answer

How to total the days according to a period?

How to total the days according to a period? Example: +--------------+--------------+--------+----------+ | data_ini | data_fim | codfun | qtd_dias | +--------------+--------------+--------+----------+ | '2014-01-15' | '2014-01-31'...
asked by 24.09.2014 / 17:16