Questions tagged as 'sql'

1
answer

How to get value from a field in SQL using C #?

The idea is that I insert data about the same person within SQL, but in different Entities, contextualizing: I have the table Pessoa : create table Pessoa( ID_Pessoa int primary key identity (1,1), Nome_Pessoa varchar(50), CPF_Pessoa...
asked by 29.11.2017 / 18:52
2
answers

How to post date and time using type '' datatime '' in sql

PHP: $date = new DateTime(); print_r ($date); result: DateTime Object ( [date] => 2017-11-07 15:51:26.000000 [timezone_type] => 3 [timezone] => America/Sao_Paulo ) Okay, see you later. Database (sql). Extras table:...
asked by 07.11.2017 / 19:12
2
answers

Select and delete duplicate records by last update date?

Between the table fields there is the field name, the field dt_add which is the date the record was inserted and dt_update which is the date of the last update of the record. I would like to know how to return and delete repeated records, for...
asked by 07.11.2017 / 20:48
2
answers

How to get last sequence in Oracle?

I tried 3 different ways, to make a select of the last sequence of my table, but none worked.    SELECT SEQ_ID_PAIS.CURRVAL FROM DUAL; Error: ORA-08002: a sequência SEQ_ID_PAIS.CURRVAL ainda não foi definida nesta sessão...
asked by 01.10.2017 / 15:38
1
answer

How to do inner join in associative table? [closed]

Tables and inserts: CREATE TABLE CLIENTE( IDCLIENTE INT PRIMARY KEY AUTO_INCREMENT, NOME VARCHAR(30) NOT NULL, SEXO ENUM('M','F') NOT NULL, ID_CARRO INT UNIQUE ); INSERT INTO CLIENTE VALUES (NULL,'GABRIEL','M',1); INSERT INTO CLIE...
asked by 19.09.2017 / 02:42
1
answer

Compare values in group by sql server

Something very unusual happened in my bank. Some records have been entered more than once (7-13) to be more accurate. This was due to a software error that has already been resolved. Now I need to delete duplicate records, but I have the foll...
asked by 09.10.2017 / 22:00
1
answer

How to call a "Stored Procedure" oracle c #

I have the following procedure in my bank: I'mtryingtocallmystoreprocedurein.netlikethis:publicintCountEvent(intresourceId,inteventCounterDefinitionId,DateTimestartDate,DateTimestopDate){intret=0;using(OracleConnectionconn=newOracleConnect...
asked by 05.10.2017 / 22:59
1
answer

How to create a Server in PostgreSQL with port other than 5432?

Is it possible to create a server inside the Postgresql database with a port other than 5432? It is possible to have  Server1: Postgresql on port 5432 and  Server2: Test on port 5433 ??     
asked by 06.10.2017 / 18:49
1
answer

Add year in my sql search clause

I've set up a procedure that does a search for the number of hours pointed per month of each company official. The procedure works fine, but I noticed that it ends up searching from years past and I would like to add another clause YEAR in this...
asked by 13.09.2017 / 20:37
1
answer

Perform calculation in SQL command

I made a select command on my table estoque where I bring the supply model , your current quantity and what your quantity minima in the inventory, for this I made query as follows: SELECT codigosuprimento, suprimento,...
asked by 13.10.2017 / 16:02