Questions tagged as 'sql'

0
answers

Change the order of an XML tag via T-SQL

Hello I'm having a demand where for a certain reason, XML was generated with the order of the tags exchanged ...: ( Scenario: I have a column in the SQL Server database (from the 2008 release) that contains NF-e XML saved from a Windows app...
asked by 21.09.2018 / 16:47
1
answer

Subquery in Oracle SQL

I have a code that aims to return open invoices from a customer in a specific time period. But I want to add a field that displays the total number of invoices, regardless of the debit period. The code looks like this: SELECT fatura.num...
asked by 24.09.2018 / 14:21
0
answers

Comp remove Special characters?

I have a problem with a report from Pentaho, prd. It does not generate the PDF report because of the amount of special characters. I wanted a way in the sqlserver to remove the characters without losing the formatting of the text. Because the te...
asked by 16.09.2018 / 19:14
1
answer

List data from 2 tables linked to parent table

ORDERS TABLE --------------------------- | id_pedido | pedido_data | --------------------------- | 1 | 2016-01-01 | --------------------------- TITLE ORDER_ITENS ------------------------------------- | id_item | id_pedido | v...
asked by 16.09.2016 / 03:53
0
answers

Parallel Task How to improve performance of this function

I'd like a suggestion to improve the performance of these methods. It has taken them too long to finish. Please if the question is not very clear just to mention that I try to improve I will make some images available with the codes. https://i.s...
asked by 23.09.2018 / 04:26
1
answer

filter between two dates with join

I have two tables: col (contributor) and Indicacao . I made select to know how many leads each employee has. It is working but I can not filter by date using between . SELECT c.id, c.nome, funcao, area, count(p.cpf...
asked by 22.09.2018 / 02:45
2
answers

MySQL error "expects parameter 1 to be resource, boolean given in"

$query = "Select * from servico where ID_SERVICO = $id"; $result = mysql_query($query); if($row = mysql_fetch_array($result)) { $nome = $row['NOME']; if($nome == 'Marketing') { include ("servicos/marketing.php"); }...
asked by 07.08.2014 / 19:13
0
answers

Columns of sql server tables are not recognized in php

I have columns that were written to the sql server with a capital letter, when I get it in php, I need them to recognize both lowercase and uppercase. For example: select * from rzv_aluno records: AL_NOME, AL_EMPRESA... etc In php I...
asked by 11.09.2018 / 22:44
9
answers

How to prevent SQL injection in my PHP code?

I developed a page in PHP for internal use of the company I work with and only very few people use it. You can use this page to do some queries, insertions, changes and deletions of a table in a MySQL database, however I believe that my PHP code...
asked by 03.02.2014 / 13:37
0
answers

How to update a select with data coming from another select

I would like to know how to update a select with data coming from another. I currently use SQL, I already have a connection created: $connection = new COM("ADODB.Connection"); //instancia a classe de conexao $connection->Open("PRO...
asked by 13.09.2018 / 15:10