Questions tagged as 'sql'

1
answer

How to convert dates in varchar to date in SQL 'Firebird'?

How can I convert dates to varchar for date ? I'm having difficulty performing cross-date searches because of this discrepancy in the database where I query. When I enter my line of code: select * from TAB_FATURAMENTO where cd_cliente li...
asked by 02.06.2017 / 14:14
2
answers

Doubt - Update in SQL from PHP form

I have a table in which columns 1 through 5 are fixed data that I feed into SQL and it appears the listing on the WEB page. In this WEB page I have a form in which the user should answer 3 questions, in inputs in columns 6 to 8. It turns out...
asked by 30.05.2017 / 19:39
2
answers

Store procedure is not working correctly

I created a StoreProcedure named, CancelNote, which, by using cursors, returns the products to the stock, passes the status of the item to canceled. It is working, however, not setting the "status" value in the [status] column. If someone can he...
asked by 30.05.2017 / 21:12
1
answer

How to change the contribution code for duplicate records

I have a query that returns me 4 duplicate lines; I need to change the contribution codes so that there is no Pk error. nm_Matricula Mes_Ano_Referencia Mes_Ano_Competencia Cod_Contribuicao DT_pagamento 32665107 102001...
asked by 23.05.2017 / 18:23
1
answer

Error connecting database (Fatal error: Uncaught Error: Call to undefined function mysql_connect () in) [duplicate]

I'm having trouble connecting to my site's database. The following error occurred: Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/cardgamming/www/configuracao.php:10 Stack trace:...
asked by 22.05.2017 / 08:56
1
answer

Return rows with the largest value in a [duplicate] column

I have a problem with a query in an Oracle database in a table with 3 columns: ID_Loja | Canal | Valor_Venda There is the possibility of having more than one sale per store and I want to know which channel was assigned to the st...
asked by 22.05.2017 / 19:00
1
answer

Search for values with priorities

I'm trying to search and I can not find the right logic to filter the results I want. I have a table with all the due dates for certain equipment. My problem is related here: Equipments (1, 22, 23) are from the same group, so if one of...
asked by 23.05.2017 / 13:47
2
answers

Change the characterset of oracle 11g

When performing a dump file import, oracle is returning the following messages: IMP-00019: Line Rejected Due to Error 12899 ORACLE IMP-00003: Oracle Error: 12899 found ORA-12899: too large value for column "USUARIO"."TABELA"."COLUNA" (...
asked by 22.05.2017 / 19:52
1
answer

Add values and subtract values from another condition

Good afternoon I have a table named TITLE In it I have got columns with name CODOPERACAO, VLROPERACAO, DTAOPERACAO I have 2 different CODOPERACAO records which are: 16 = Inclusion of title 28 = Payment of the title There may be more tha...
asked by 19.05.2017 / 23:10
1
answer

Create condition in statement

Hello, I have the following select: SELECT CONSTRAINT_NAME FROM user_cons_columns WHERE COLUMN_NAME = 'CANCELAMENTO' and table_name = 'NAVIO'; After getting the name it goes to another query but if it returns null I end up having an error a...
asked by 17.05.2017 / 15:53