Questions tagged as 'sql'

2
answers

Query values with 0 included in count () even if they do not have values

I need to check the number of notes issued with template 55 to create a report. The problem is that I'm having to put zero values in the quantity column even though they have no value at all. Ex: empresa filial data quantidade 5...
asked by 13.12.2016 / 12:53
0
answers

"Transpose" table in classic ASP

People, I have a table in SQL with the following columns "pv, product, values". Currently I have a registration form, where the person inserts these values and he goes to this table with id auto increment. But I need to generate a control...
asked by 28.06.2018 / 22:40
0
answers

Remove fixed lenght from SQL Server

The string fields of the tables in my database are coming with fixed length as true. So if the size is 60, and I saved a string with size of 30, it fills the string with spaces up to the full size. If it is in edmx and set manually to false it w...
asked by 30.06.2018 / 20:33
1
answer

Error running .sql via .bat

The query runs fine sqldeveloper but when calling via .bat does not recognize commands like ( case, nvl,sum ) Has anyone gone through this?   'C: \ oracle \ app \ oracle \ product \ 11.2.0 \ server \ bin \ sqlplus.EXE @C: \ V1.sql'...
asked by 03.07.2018 / 22:20
0
answers

How to enumerate a column with update?

Hello, I'm new to sql and need help: I have the following columns: Usuário | Ranking | Posição Fulano 300 1 Ciclano 400 2 Beltrano 500 3 I wanted to know how to put this position 1 2 3 ... without being...
asked by 17.06.2018 / 06:34
1
answer

How to display data from a SQL Server query using PHP?

I'm trying to display data from a table in my SQL Server database using PHP, but I'm not getting it. The code does not error but also returns nothing. The code is this here: <?php $serverName = "MIRCIA-PC\PRIMAVERA"; $resultadoectionInfo...
asked by 16.06.2018 / 18:55
1
answer

How to open connection with 2 tables in php

I am having difficulty connecting twice to my database, each time I connect to a table the code and the following: Categories <!-- Portfolio Grid --> <section class="bg-light" id="portfolio"> <div class="container...
asked by 15.06.2018 / 05:53
0
answers

ParentID Name in a Tree Table

I have an SQL table with Continents, Countries, Regions, Cities. Continents have parentID = 0 , countries have parentID = continentID , regions have parentID=countryID and cities have parentID=regiaoID , continentI...
asked by 14.06.2018 / 14:08
0
answers

Problems in inserting data from PHP to bank

Below is the HTML code <?php include_once 'config.php'; ?> <!DOCTYPE HTLM> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1, shrink-to-fit=...
asked by 18.06.2018 / 21:18
0
answers

ORACLE SQL - Complex report

Good morning, I need to get a report that is not made available by the system, working with the invoices table. In this table there is the data of the customer, consumer unit and the value of the flow. It turns out that a customer can have more...
asked by 13.06.2018 / 14:42