Questions tagged as 'sql'

1
answer

Should I declare scalar variable?

I have a method created in a mapper that I use to verify the username and password for a login, the code is as follows: public Usuario buscarUsuarioPorNombreYContrasenia(string xNombre, string xPass) { var param...
asked by 28.12.2016 / 01:53
1
answer

Error opening the file. Fault PdfPTable iText - JAVA

I'm making a PDF impression thanks to the iText class. I have the query made which shows me the data of the clients in my database, the query works both in SQL and in commands. I print the data in a PDF correctly but now I want to add that d...
asked by 26.12.2016 / 12:44
1
answer

Use selection function with a certain parameter and without parameter

I have a system to register students to projects that have a university (projects table), which should not be in another project. This system allows me to see a list of students who have the ability to be registered to enroll them, before it...
asked by 30.11.2016 / 13:15
1
answer

Queries of records in tables many to many with laravel

How would you do when checking the records of two related tables (many to many) using a pivot table of laravel? I try to do it with Joins, but I can not find what I want. The tables are: user role_user roles     
asked by 14.12.2016 / 16:39
2
answers

I have a problem in java when executing an sql query to show records in a jtable

This problem occurs to me with this method to show data from a bd in java, because it tells me that the query did not generate any results when I saved in my form and I need to save and that immediately I show the record, this code shows it but...
asked by 20.12.2016 / 01:10
1
answer

How to remove or hide duplicate records from two detail tables with a master table in Mysql?

I have the following tables: CREATE TABLE 'COMPRAS' ( 'codigo' CHAR(10) CHARACTER SET utf8 NOT NULL, 'periodo' SMALLINT(4) NOT NULL DEFAULT '0', 'mes' SMALLINT(2) NOT NULL, 'numero_indicador' INT(12) NOT NULL DEFAUL...
asked by 18.11.2016 / 02:10
2
answers

Can MySQL format AUTO_INCREMENT?

I have a table in which the primary key is in 'BCB001' format, I would like to know if there is any way to format AUTO_INCREMENT so that I can fill in the field I need.     
asked by 13.11.2016 / 18:20
1
answer

How is the relational model? [closed]

The Suppliers_Products table is generated, and this is immersed as attributes the supplier code and the product code plus the date of shipment, the question is, the product table no longer needs the provider code for data redundancy or I'm...
asked by 30.10.2016 / 04:30
1
answer

MySql query from a page on asp.net

I'm trying to implement this code snippet public List<int> Temperatura() { List<int> Datos = null; string connStr = "server=localhost;user=root;database=sensores;port=3306;password=123456;";...
asked by 15.11.2016 / 05:46
1
answer

Insert date and time to DATETIME [closed]

I have a date and time with the following value: 2017-01-27_12-52-00-9370 What I need is to insert it into the database with the DATETIME data type Thanks.     
asked by 30.01.2017 / 10:04