Questions tagged as 'sql'

1
answer

SQL Query return records only after 2 days prior to today

Well, as a beginner in SQL, I need some help. I need only bring records that have not been moved for more than two days. The query below is bringing everyone without this condition. I even did a test using the datediff, but I'm not sure if th...
asked by 26.07.2017 / 02:31
1
answer

Register on more than one table with Laravel

So I have 3 tables (doctors, addresses and phones), first I insert into the table doctors using the store method that gets in its own controller, and I get the id created for it and insert into the other tables along with the other information. F...
asked by 02.07.2017 / 01:38
2
answers

How to make a welcome screen in PHP?

I want to create a welcome page for the user who logged into the site. My difficulty is in creating the query as I do it and show the user name through an echo? login.php form <?php session_start(); if(isset($_POST['submi...
asked by 30.06.2017 / 06:22
1
answer

Problems updating data with empty DateTime

I need help with the following ... I need to update several data at once through my application, but one of the conditions is that the field field in the database is empty because it is the one that will be updated. The field in question is...
asked by 21.09.2017 / 02:26
1
answer

Select in Firebird with PHP using conditions

How do I correctly include the select below in php code? I'm having trouble making WHERE . SELECT ESTOQUES.produto, ESTOQUES.cor, ESTOQUES.tamanho, ESTOQUES.filial, CODIGO_BARRAS.barra, ESTOQUES.saldo FROM ESTOQUES,...
asked by 21.09.2017 / 15:01
1
answer

How to pass parameters qry.filter Delphi

I need to filter data from a grid, but I need to pass by parameter. if it is necessary to return all the data.  I always do the following to show all the data in the Grid Example: SELECT FROM TABELA A WHERE (A.NUM = :parâmetros) OR (:parâmetro...
asked by 22.09.2017 / 14:25
3
answers

Update in the values of the CD_SETOR column in all the tables found with the column

Using select SELECT * FROM DBA_TAB_COLUMNS WHERE column_name like 'CD_SETOR' I get many tables with different owner with the same CD_SETOR. EX: Owner Tables Column Type 210 MVINTEGRA INTEGR...
asked by 21.06.2017 / 22:37
1
answer

Group duplicate lines Sql Server

I created the query where I have a Products table and another inventory (1: N) I need to add the stock of each product has in the inventory table, I made the following query: select DISTINCT p.ID,IsNull(p.CodigoBarra, '') As CodBarra,IsNull(p...
asked by 23.06.2017 / 02:07
1
answer

SQL - Crossing tables within tables

I do not know if the title is appropriate, but come on. I have in Table A (table of processes queried) two key fields (new_process and old_process) and I have in my table B my interest variable (new_process_process). In Table C, I have the co...
asked by 03.07.2017 / 22:15
1
answer

Querying results using SQL or XAILER programming tips

I have the following relationship between 3 tables: 'SELECT contareceber.codcontareceber, contareceber.codorganizacao, contareceber.dtdocumento, contareceber.dtvencimento, contareceber.valortotalbruto, contareceber.valortotalrecebido, conta...
asked by 08.06.2017 / 18:30