I'm developing a routine with a pivot table using javascript, where when I open the routine a button 'ADD TABLE' appears
Whentheuserclicks'ADDTABLE'thetableheaderappearsandan'ADD'buttonthatisresponsibleforaddingrowstothetable. Theproblemisth...
I need to insert into the MySQL Database (table fotos ) the path that is set to $target_file_name . I believe that the error is probably at the time of INSERT .
File conexao.php :
try {
$PDO = new PDO($dsn,...
I have a question ... I do not know if I'm putting the code correctly, I'm a beginner in php and I need a help ... I already managed to do the form that I have to write to MySql ... but now I'm messing around in a SQL Server and I can not get it...
The SQL query below is returning a wrong result for the Delay value field.
SELECT
DATE(p.dt_pedido) AS barChartLabels,
COUNT( DISTINCT p.id) AS qtdPedido,
SUM((item.quantidade * item.preco) * p.taxa_compra) AS percentualCompra,
SUM(item.quant...
I have a very simple trigger before update, I would like to get the sql that triggers that trigger.
CREATE OR REPLACE TRIGGER atualiza_subelemento
BEFORE UPDATE ON tb_material
FOR EACH ROW
BEGIN
IF :OLD.CD_SUBELEMENTO IS NOT NULL THEN
DBMS_OUT...
How do I get records for today's date up to 1 month ago in SQLSERVER?
I know that for example, with 7 days, I use GETDATE () - 7. But for 1 month, what would it look like?
In the select below, I would like to use the novonome alias in the second column (instr).
select
substr(titulo, 1, 20) AS **novonome**,
instr(**novonome**, ' ')+1
from conteudo;
But I get the error:
ORA-00904: "newname...
In IBExpert the query below brings the data correctly, but when I use the same query in PHP it does not work.
SELECT
FUNCIONARIOS.nome,
CNPJ,
cod_funcionario,
LOGRADOURO,...
I have a sql query that lists two tables:
Register and release.
I have an application that adds the "id" of "register" in the "release" table,
I want to display only the results that do NOT exist in the "unpin" table.
follow the query:...
In a SQL query I was trying to work out a way to select a value from another B column if the selected A column is null . At first I made the following query:
SELECT COALESCE(NULLIF(max(convert(smalldatetime,DEP.DATAENTRADA,100)),null), DE...