Questions tagged as 'sql'

0
answers

Insert in database with JavaScript and php

I'm trying to insert into the database. The operation would be to give the button "Apuntarse" and that by inserting the user and the id of the hang-up to the database at the same time that the button is deactivated and the "Unplug" button is act...
asked by 08.06.2018 / 11:34
1
answer

How can I avoid duplicate data when filling an array from an sql query?

I want to bring several data according to the year to which the data belongs, but when making a foreach I create more arrangements with the same year, and does not unify the data for the same year: See base de datos : $dataa...
asked by 07.06.2018 / 22:54
1
answer

Insert correlative to an ID field in SQL

I'm currently making an export with this Script: /* FromTable 1:Otrntransaction, 2:OtrnTrnTaxAmount, 3:Marckup */ SELECT '1' AS FromTable, T1.ID_Trn AS IdDiarioTrans, T1.PostingDate AS Fecha, T2.AccountNo AS Folio,...
asked by 07.06.2018 / 19:40
0
answers

Is it better to use ADO.NET or EF to manipulate database objects from MVC? [closed]

I currently use the Entity Framework to make database connections from C # with MVC, but I find it rather tedious to be adding the tables and everything to the database model in the project, and if something is modified I have to delete and re-a...
asked by 01.06.2018 / 00:35
1
answer

Query sql to 2 related tables

I'm trying to list results from two related tables, but I'm not capable. These are the simplified tables: table1 id | fecha table2 id | horario I'm trying to filter the results by date range and show the time column of the ot...
asked by 20.06.2018 / 23:39
2
answers

Failed query to database

I'm trying to make a query to a car database and it does not work for me, the function where I do the query is this: public static ArrayList<Coche> filtradoAnuncios(String valor_marca, String valor_modelo, String valor_anyoDesde, String...
asked by 20.06.2018 / 15:34
2
answers

Sort records by defined quantity

I have the following Query. SELECT * FROM EMISORAS TE INNER JOIN SUCURSALES S ON S.NUM_ = TE.NUM_ WHERE ISR <= .16 AND HTP <= .03 AND TTB <=.06 ORDER BY ISR DESC, HTP DESC, TTBDESC But I need to show the other registers, that is to...
asked by 20.06.2018 / 16:46
0
answers

Doubt with query in MYSQL

I will try to explain my doubt in a simple way since it is something complex. I have a table called formacion with the fields ID , Tipo , Categoría and SubCategoria A table called alumnos with the fi...
asked by 10.06.2018 / 19:28
1
answer

Update multiple records in the BD, 1 time per record in Rails

I have a code that is updating user registries in a DB, but it is updating the registration of each user the number of times there are users in the database, eg. I have 3 users = > medic1, medic2, medic4 in the SQL you can see that it is upda...
asked by 19.06.2018 / 19:04
1
answer

How to use ENCRYPTBYPASSPHRASE and DECRYPTBYPASSPHRASE in hibernate?

I comment, I'm working with hibernate 4.3 in netbean with SQL connection and in my database I have the following table: USUARIO( ID_USUARIO VARCHAR(08) NOT NULL PRIMARY KEY USU VARCHAR(12) CLAVE VARBINARY(8000) ) Before working with hibe...
asked by 10.06.2018 / 19:22