Questions tagged as 'sql'

1
answer

Error in Sql-Server when executing a stored procedure

I have 3 parameters that a procedure receives, how do I pass the values for the variables err_buff and ret_code ?, as null ?, I mark the errors of invalid number of parameters PROCEDURE XX7E_EXT_FAC(err_buf OUT VARCHAR2,ret_code OUT NUMBER, P_...
asked by 21.06.2017 / 17:39
2
answers

Problem avoiding duplicate records

First of all I want to say that I have already reviewed the possible answers to this in this and other forums. As indicated by the title, what I want to do is: if there is a record with the same number, launch an aletra with js and if not, regis...
asked by 21.06.2017 / 21:30
0
answers

Syntax failure in PHP call to a Select

I have this select to show some data in parentheses, but I think it has a syntax failure: <select class="form-control" name="compania1" id="compania1"> <option value="<?php echo isset($obj_categoria) ? $obj_categoria->__G...
asked by 15.06.2017 / 16:27
1
answer

Retrieve values from 3 tables

I have three tables servicios , usuarios e instaladores2 , as shown here: usuarios servicios instaladores2 --------------- --------------------- -------------- id_usuari...
asked by 14.06.2017 / 18:26
0
answers

PROCEDURE SQL Server WITH PARAMETERS TO XML ERROR PLS-00049

I have a package with a store procedure that receives three parameters and makes a query of a user, that extraction I need to pass it to an xml file, but when I pass the parameters it marks me an error of "bad bind variable", if I put a fixed va...
asked by 14.06.2017 / 22:37
0
answers

Select all fields in a table for a subquery

I have a query which is the union of 3 queries. In which all the locations of children and grandchildren are gathered within the parent locations, that is: father: URG children: URG-01, URG-02 grandchildren: URG-N-01, URG-N-02 with a...
asked by 14.06.2017 / 18:12
0
answers

DECLARE syntax-error in MySQL

I have this error that has to do with declare , and I tried many ways, but I can not fix it: declare '@i' int set @i = 1 while @i <=10 -- 1.000.000 filas begin insert into neptuno.varchar_variable_dcha select top (100000)...
asked by 12.06.2017 / 21:18
0
answers

check out if the user exists or not in the database

I'm trying to do this validation on my server but it does not work out when I pass a string value to the method that would be a user name, it must go through the methods and see if it exists in the database that does not let you out and if it do...
asked by 07.06.2017 / 07:28
0
answers

Query does not recognize variables in Codeigniter

When doing an update in codeigniter, it does not recognize the variable that I am passing to it. public function actualizaPropiedadModel($tipoPropiedad,$cItem) { $data = array('tDescripcion' => $tipoPropiedad); $this->db-&g...
asked by 12.06.2017 / 16:28
1
answer

Query in tree with accounts by level

Good afternoon, I have a tabla that has clave , clave_padre , anio and nivel , and on the other hand I have a tabla2 that has the clave , cargo , abono , mes and anio . Wha...
asked by 13.06.2017 / 22:32