Questions tagged as 'sql'

3
answers

comma separated an array to query sql

I am using an array in VB.NET, then I pass it to a sql selection query in the following way SELECT * FROM empresa WHERE factura IN ('" & val & "') where val is an array, but the drawback is that each value of the array must be separ...
asked by 01.07.2016 / 18:35
1
answer

Obtain records of several tables without duplicates in postgresql

I'm having a problem when it comes to bringing the database records, I have an inventory system of some technological equipment, each one has an asset code, but an asset code can be on several computers since an asset can be made up of several c...
asked by 28.06.2016 / 23:30
1
answer

add two minutes to a date with time

I am doing a query that brings me the records that were updated today with equal time, minutes and seconds How can I make a select so that there is a range of two minutes before and after the date and current time? since I work wit...
asked by 01.07.2016 / 17:20
3
answers

Optimize SQL query

I have the following SQL query SELECT (SELECT NVL(max(f_mov), '') AS f_mov FROM tmp_vtas_clientes AS b WHERE a.c_linea = b.c_linea AND a.c_almacen = b.c_almacen AND a.c_producto = b....
asked by 30.04.2016 / 15:57
2
answers

problem when making a query in laravel

I make this query: public static function searchYear($year) { return DB:: table('contract_works') ->select(DB::raw('Year(dateFailure) as dt')) ->where('dt',$year) ->orderBy('dt','asc') ->get(); } but it tells...
asked by 04.05.2016 / 17:17
2
answers

problem when comparing by date format

I retrieve a date from a record that is in the BD and it brings me in this format "07/01/2016 05:43:10 pm", then I compare that date to make a condition to update my record since it is the only field that can be different for all the other recor...
asked by 04.05.2016 / 17:06
1
answer

Parameter value is out of range C #

Good hope you can help me, I'm doing an insert but at the time of inserting I get the following error. Parameter value 3420590313.72700000 is out of range my Store procedure that performs the insertion is decimal (19,8) and the column that...
asked by 02.01.2019 / 23:17
3
answers

web site in mvc can not connect to the database in azure sql

I have a site in mvc that connects to a database all mounted in Azure , when a local site test is done correctly, but when doing the deploy a Azure shows that you can not connect the site with DB . the database firew...
asked by 25.01.2016 / 14:50
1
answer

Check between two date with Eloquent time

Hello, I need to make a query between two dates with hours $data = Modelo::whereBetween('created_at', ['2018/11/10 12:00', '2018/11/11 10:30']) ->get(); But when making this query it brings all the results between the dates without takin...
asked by 27.11.2018 / 19:35
1
answer

how to get an average in an sql query?

Could you help me solve this doubt I have. I need to show for each blood type that number of employees has it, also showing the total percentage of employees of the company represents that amount. Here the problem is that in percentage...
asked by 23.11.2018 / 01:26