Questions tagged as 'sql'

0
answers

SQL SP sp_send_dbmail

I changed the% s SP by putting a new parameter in it. Is there any time when this SP is updated and the changes made are lost? (SQL Server 2017) Thank you     
asked by 04.09.2018 / 12:31
0
answers

Finding Search Results in Custom Fields

How do Wordpress search custom fields? I searched and saw that the search for it works by using the title and content of the content. I've created a project that uses custom fields, such as: address, and phone number, with the user being able...
asked by 31.08.2018 / 13:10
0
answers

Create Trigger to update table of BANK 2 when changing table of BANK 1

I have several databases BANK_1 (Main) BANK_2, _3, _4 ... (Companies). In every bank there is a company table, who have the same structure, in BANK_1 I have the company register of all BANK_2, _3, _4 ...! I would like to update any company infor...
asked by 07.09.2018 / 17:57
2
answers

Trigger with null value

Good evening guys, I need to make sure that the address and phone columns are null, in case an error message is returned, otherwise the operation will take effect. my code looks like this: CREATE TRIGGER VERIFICA ON cliente INSTEAD OF INSERT A...
asked by 06.09.2018 / 00:54
0
answers

How to use PDO and PHP to Display in Search Data Table

I have a question. I do not understand why my code is not correct. Please, if you can review it, I would be very happy. <?php require_once "db_connect.php"; //conectar banco $conectar = new PDO("mysql:host=$host;bancodedados=$b...
asked by 10.09.2018 / 21:38
0
answers

initial SQL to list clients (PF and PJ). How to migrate a pure SQL Query to Eloquent from Laravel?

I set up an initial SQL to pull the data. It is working in pure SQL. I need to migrate this code to Laravel's eloquent pattern. Can someone help me? Thank you! Here is the sample SQL: Code: SELECT c.cod_cliente, p.cpf, p.nome, ct_m...
asked by 29.08.2018 / 16:56
2
answers

Add column value by grouping monthly and by product

Personal I need to calculate the monthly consumption of licenses used here in the company I work with. I have a table with the product (dbo.Product) , the number of licenses installed on the server (dbo.License) the date the product was in...
asked by 29.08.2018 / 16:08
3
answers

CONNECT BY application - Oracle SQL - DFS search without repeating lines

Dear, Suppose a graph is registered in two ways: TABELA_A: T | V1 | V2 1 | 1 | 2 2 | 2 | 3 3 | 2 | 4 4 | 4 | 5 TABELA_B: T | V1 | V2 1 | 1 | 2 2 | 2 | 3 3 | 4 | 2 <====OBSERVEM QUE AQUI INVERTI OS VÉRTICES 4 | 4 | 5 T...
asked by 31.08.2018 / 23:23
3
answers

Obtain the sum of the authors' books with Mysql

I'm starting with the sql and I'm trying to get the sum of all the books from each user in the cart table, but I'm not getting it. drop table if exists carrinho_de_compras; drop table if exists usuario; drop table if exists livro; create tabl...
asked by 20.08.2018 / 17:38
2
answers

Get ID of a line that was just created in PHP

Hey guys, So I have a problem that is as follows, I have a table players , a table training and a helper table treadmill (where will I see if some player is currently training) The question is, how can I do that by the time I create a worko...
asked by 10.11.2015 / 19:44