Questions tagged as 'query'

1
answer

Limit and Offset for web paging in SQL Server

I'm working with PHP and I have about 8000 records currently in DB. As it is for a web page, I need to make a pagination to be viable reading the data. As I understand it, I have to do something similar to limit and offset to...
asked by 28.11.2016 / 13:35
2
answers

Show first and last record of each date

I would like to search the database for all records according to the "DOCTOR" between two dates DATA_INICIAL and DATA_FINAL Without repeating records of the day. CURRENT RESULTS: BRUNO BARBOSAS 02/04/2018 12:18 02/04/201...
asked by 26.08.2018 / 04:18
0
answers

Recursive query firebird

I created a table that it gets its own id, to create something like a tree, cascade, etc. I'm having trouble making a query and returning the record "parent" and its "children", "grandchildren", etc. I made a query, but it gives " has cyclic...
asked by 23.08.2018 / 20:42
1
answer

Problems with return of the query in laravel 5

Hello, I'm having problems with my laravel search function class PesquisaController extends Controller { public function pesquisaMonitoramento(Request $request, Monitoramento $mot) { $mot = $mot->newQuery(); if($request-&...
asked by 10.08.2018 / 16:08
1
answer

Power BI - Oracle SQL Query

Hello, I'm trying to get data in Power BI via Query in an Oracle DB and is experiencing the following error. Unable to establish connection Details: "Oracle: ORA-01843: not a valid month" SELECT DISTINCT J.JOBID, J.JOBNAME, --J.FOLDER...
asked by 05.08.2018 / 20:22
1
answer

Error with relationship - Laravel

I have 2 related tables and I want to show 1 data that has only one "pulling" this relationship. tables: Users: Permissions: Tablethatwilllist: Code:@foreach(App\User::all()as$user)<tr><td>{{$user->id}}</td><td&...
asked by 27.07.2018 / 20:27
1
answer

Return row count of a query

I'm trying to validate a login using row count of a query, but I'm not getting it: My connection looks like this: include("defines.php"); try { $PDO = new PDO('mysql:host=' . HOST . ';dbname=' . DB, USER, PASS ); $PDO->exec("set name...
asked by 10.08.2018 / 02:54
2
answers

How could I improve this SQL query with sub querys?

There are many sub selects, how could I improve this query in MySQL and make a sum of max of 'total_points_period'? Take the total of points for a period of the "user_bigdata" table and the total points of the "olympic_players_niveis" table a...
asked by 24.07.2018 / 19:33
1
answer

PHP: Group data without using 'group_by'

Does anyone know how to group data without using group_by in the query? I need every 10 results to create a div , that is, 10 records within each div I do not care about values. <?php foreach($resultados->result() as $resultado)...
asked by 22.07.2018 / 03:50
2
answers

Python code too slow ?? Access to Access database with pyodbc

I need to get some data from a huge access database (two, actually, depending on which input I have). I have a function that calls that bank by chunks (if I try a fetchall gives memory problem). This function is sometimes called by my main funct...
asked by 20.07.2018 / 18:48