Questions tagged as 'sql'

2
answers

discriminatory query sql server

I have a query: select tbAfiliado.id,tbAfiliado.nombre, tbPrograma.nombre_programa from tbAfiliado inner join tbPrograma on tbAfiliado.id_programa=tbPrograma.id where tbAfiliado.id=15 which returns me several rows: 1-carlos-fi 2-j...
asked by 17.05.2018 / 18:43
1
answer

How can I use the function case when then else end in report studio 10.2.2 cognos

Hi, I'm trying to do this but it does not work for me who can explain how? case [CD PRODUCTO] when [CD PRODUCTO]='100476' and [CD PRODUCTO]='100222' then [MONTO VENTA] = 0 else [CD PRODUCTO] end Thanks in advance.     
asked by 22.05.2018 / 21:54
1
answer

Using if within an exec () and showing syntax error

How about good morning I try to print the value of a variable inside an exec () depending on an if but I mark syntax errors. DECLARE @VALOR1 INT SET @VALOR1 = 1 EXEC (' IF ('+@VALOR1+' = 1) print '+@VALOR1+' ELSE...
asked by 15.05.2018 / 19:23
0
answers

Convert a SQL query to JSON and iterate it in Django

I have a query that I perform on a link to an API and it returns a result in STRING, what I want to do is convert it to JSON and iterate it to be able to handle each result of that query individually. Right now in the views I have: url = "h...
asked by 15.05.2018 / 10:19
0
answers

Make one column depend on another

I need that when inserting a row, one data is updated in function of another. In this case I intend that number2 be updated to be the same as number1, but the trigger does not work CREATE FUNCTION igual() RETURNS trigger AS ' BEGIN new.numer...
asked by 18.05.2018 / 19:49
0
answers

Load dynamic excel using Integration Service

What I need help is to be able to file with dynamic names using integration service, for example I have 5 files in a folder using a loop for each achievement to upload the 5 to a target table in SQL, my problems is that I would like the next loa...
asked by 18.05.2018 / 18:31
0
answers

LogIn, Connect a Local DB to a mobile BD, synchronize data manually

I have a school project where I am asked to create a login by consulting a mobile BD, this database must be connected to a local database with a button that updates the information of the Mobile Database in the local database, I leave a diagram...
asked by 13.05.2018 / 07:19
0
answers

Refresh listbox when changing another

I am trying to create a system through listbox, that when selecting one, update the other. One is EQUIPMENT and another is that of PLAYERS. At the moment, I have a script with ajax and an example in php, but it does not work for me...
asked by 17.05.2018 / 11:31
1
answer

Total count add sql [duplicate]

I want to show the total registration and at the same time add that total SELECT t.empresa, COUNT(t.idespecialidad) AS count, e.nombre AS nombre_especialidad FROM tickets as t INNER JOIN especialidad AS e ON t.idespecialidad...
asked by 10.05.2018 / 21:49
1
answer

error when compiling a stored procedure in oracle

Dear good evening. I request your help with the following script CREATE OR REPLACE PACKAGE pkg_ingresar_cliente AS CURSOR cur_id_cli IS SELECT id_cliente FROM registro_cliente ORDER BY id_cliente DESC; PROCEDURE prc_...
asked by 09.05.2018 / 04:16