Questions tagged as 'sql'

1
answer

Error when calling the report

I have an error below, when I call a report, which has a query in the database, I can not resolve it. Takealookattheresultyouhavenothingwithzero Followthecode:SELECTSD.D2_DOC,SA.A1_NREDUZ,SB.B1_DESC,m.nm_mes,SD.D2_QUANT,SD.D2_PRCVEN,(SD.D2_C...
asked by 12.04.2017 / 14:18
2
answers

SQL Replace when any variable contains a semicolon

I am using this command without problems to replace class="texto1" with class="texto2" : UPDATE tabela SET estilo = REPLACE (estilo,'class="texto1"','class="texto2"') WHERE estilo LIKE 'class="texto1"'; It works perfectly, but...
asked by 12.04.2017 / 01:05
2
answers

About Date in MySQL

I'm doing a program for a college job, with a connection to the database. In a table, I have a NASCIMENTO column of type DATE . In the program I have a MaskedTextBox to insert the date of birth, however I put our dates mea...
asked by 22.04.2017 / 03:38
1
answer

problems to create multiple tables in Oracle

I'm new to using Oracle , I used firebird before. I would like to know, why I can not create multiple tables at once in the sql master of SQLdeveloper . It creates only the first table (Country). I try to execute the follow...
asked by 18.05.2017 / 17:42
1
answer

Return only the last record entered in the MySQL database [duplicate]

Hello everyone, I have a project but I have to make a query and return it to the "last line" or last record inserted in the database.     
asked by 13.05.2017 / 20:09
1
answer

Oracle End of file when executing procedure

I'm having the following error message when executing this procedure *Encontrado simbolo "end of file" quando era esperado:* DECLARE -- LOCAL VARIABLES HERE I INTEGER; BEGIN FOR NCM IN (SELECT * FROM NCM_NCM) LOOP UPDATE ADMPRODU...
asked by 04.04.2017 / 18:53
1
answer

Export SQL query data to Excel

Good afternoon guys. I created a database to control receipt and delivery of cards. The inclusion of the data is done through a form in excel. This form also has the option to query existing data. the query returns the information in the f...
asked by 30.03.2017 / 17:29
1
answer

Conversion of a Date Subquery to Character in Oracle

I have a sub-query returning dates this way: SELECT DISTINCT DT_EMISSAO_NF FROM DANFE ORDER BY DT_EMISSAO_NF DESC And, starting from this query, I need all the returned dates to be converted into a character in this pattern 'DD / MM / YYY'...
asked by 02.05.2017 / 20:03
1
answer

Parameterized query error: Must declare scalar variable [closed]

I am aware of the existence of this question: Procedure error " Must declare the scalar variable " But it does not solve my problem. My situation is as follows: I have a common sql query: select id from USUARIOS where login = @txtlogin...
asked by 10.07.2017 / 20:30
2
answers

Bring the count of the word "DATA" of a calculated column in SQL Server

Good morning, I have a query that brings in a calculated column the information of "Data" and "Historicos", in this column I have the Prefix of the item (vehicle license plate) and the column with its calculation. I need to change this query so...
asked by 07.07.2017 / 20:29