Questions tagged as 'sql'

1
answer

Query in two tables with SQLITE [closed]

I have a question, I have two tables one is called Factura containing ID_FACTURA, ID_CLIENTE, TOTAL, I have another table called Detalle contains the columns ID_FACTURA, ID_CLIENTE, FECHA. What I need is to make a query...
asked by 13.11.2017 / 03:37
1
answer

Error converting the data type varchar to datetime

My problem is I want to add three dates that are in datetime format in sql. these date variables are in an SP and when sending the information manually in sql server: exec spInsertaCargoCobranzaMV '00024','002',21554,1,0,500.00,'5-19-2017',...
asked by 15.11.2017 / 01:25
2
answers

Conflict DELETE Statement with reference to Foreign Key

Use SQL Server 2017 with Management Studio and Java 8. I have a database about movies and I receive an error when trying to delete a movie that is referring to another table that acts as an intermediate. Diagram (example values in red):...
asked by 13.11.2017 / 04:11
1
answer

Any way to insert records when the table has default and identity in SQL Server?

CREATE PROCEDURE USP_ADD_CLIENTE @PNIDTIPDOCUMENTO INT, @PSNUMDOCUMENTO VARCHAR(35), @PSNOMBRES VARCHAR(40), @PSAPEPAT VARCHAR(25), @PSAPEMAT VARCHAR(25), @PSCORREO VARCHAR(40), @PSTELEF VARCHAR(25), @PNESTADO INT, @PSUSUREG VARCHAR(40) AS IN...
asked by 06.11.2017 / 19:16
1
answer

how to make a difference in mysql?

I have the Table A: ------------------- * fechaA * ------------------- * 2017-09-01 * * 2017-09-02 * * 2017-09-03 * * 2017-09-04 * * 2017-09-05 * * 2017-09-06 * * 2017-09-07 * * 2017-09-08 * *...
asked by 18.09.2017 / 17:05
1
answer

DML triggers, the inserted, deleted and "updated" tables

I have been using DML triggers, the inserted and deleted tables. But I can not find the way to have the same functionality after updating a table. Is there any way to do it?     
asked by 20.09.2017 / 00:18
2
answers

There is already an object named ##Temporal Table in the database

I have the following stored procedure, which allows to generate a report in Excel. The fact is that when several users are generating the report, a series of errors appear indicating that there is already an object called ##rpttabla in th...
asked by 22.09.2017 / 01:09
4
answers

Error of variables declared in a stored procedure

I have this procedure that I use to choose between one type of user or another for a login window, I get syntax error but I can not find the logic failure. SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE Sp_Login -- Add the...
asked by 21.09.2017 / 11:14
1
answer

Connecting to different OLE DB origins in SSIS

For several days now I am trying to make a connection to the BDD through the OLE DB wizard in Sql Server Integration Services. What I need is to be able to connect to different servers to be able to do the same query but in all the servers at th...
asked by 24.08.2017 / 16:55
2
answers

Modify value that changes another value in SQL

My Update function: public function Update($pcosto, $user_id) { $query = $this->db->prepare("UPDATE users SET pcosto = :pcosto WHERE id = :id"); $query->bindParam("pcosto", $pcosto, PDO::PARAM_INT); $query->bindPar...
asked by 08.08.2017 / 20:06