Questions tagged as 'sql'

2
answers

I would like to apply for phone numbers in MySQL

I need help As in SQL you can format phone numbers, with a N_Cel varchar(8) check((N_Cel)like '[2|7|8|5][0-9][0-9][0-9][0-9][0-9][0-9][0-9]') NOT NULL, I want to do the same in MySQL but it makes a mistake, could someone explain to me?...
asked by 29.06.2018 / 23:39
4
answers

Translate an SQL query to LINQ

I am very new using LINQ and I have done few things, right now I have an SQL query that I must implement in LINQ and I have no idea how it is done. SELECT Boletas.Boleta, DATEPART(DW, CAST(Boletas.Fecha AS datetime)) AS DiaDeLaSemana,...
asked by 28.03.2017 / 19:58
0
answers

Procedure stored in laravel with parameter

I have seen two syntaxes when calling stored procedures that receive parameters in laravel, both work perfectly: //Concatenando parametro DB::select('exec Miprocedimiento "'.$parametro.'"'); //Utilizando ? DB::select('exec Miprocedimiento...
asked by 11.04.2018 / 17:17
3
answers

Get a total through a single query

I have the following tables where I'm taking an inventory, but I also have a reservation table. Tabla Inventario ------------------- | pieza |cantidad | |--------|---------| | pieza1 |100 | | pieza2 |20 | | pieza3 |30 | |...
asked by 02.10.2018 / 21:30
0
answers

To install a software created by me I must install a BD [closed]

first of all, thank you very much for reading. I'm a novice really, I'm interested in making software, with C #, a windows application which works with its own database. To develop it I am using SQL Server 2014, my doubt is once I finish th...
asked by 04.05.2018 / 08:11
4
answers

How to call a stored procedure from the Entity Framework 6 code first

I'm trying to call this stored procedure from C # alter PROCEDURE GetLecturasEnRangoDeFechas -- Add the parameters for the stored procedure here @fecha as smalldatetime, @idParteMaquina int, @inicio int, @inicioMasDuracion int, @dia smalldatet...
asked by 11.01.2016 / 17:44
5
answers

Add time in PHP array

I am saving the time in the database with a field of type time . I'm going through an array of data and I want to be able to add them. I have the following method: <?php sumaHoras = 0; ?> <?php while ($row = mysqli_fetch_as...
asked by 31.08.2018 / 22:43
3
answers

Filter results in PHP / MySQL

I'm doing a message page in PHP and MySQL, I have a table called usuarios with the fields id , user , edad , pais and ciudad . I would like the user to be able to search for other users according to certa...
asked by 16.08.2017 / 16:05
1
answer

SQLite3 does not fail to insert nonexistent reference

I am working against a database in SQLite3 and I was surprised to be able to insert a line with a reference to another table in which the corresponding row with the foreign key does not exist. The following minimum example illustrates the sit...
asked by 07.01.2016 / 09:17
5
answers

Error in date format sql server 2012

I have an application whose information is stored in a database on sql server but I have the following problem: When making a query with the following script directly from the sql server engine, it returns me records: SELECT * FROM PR_11 WH...
asked by 05.02.2016 / 21:50