Questions tagged as 'query'

1
answer

Get the last record of DynamoDB

I'm trying to get the last record of x variable in a dynamoDB table using php. The simple way I had was to get the data for the last 10 minutes and those get the first. //Ruta de la variable que se quiere obtener $nameVariable = $this->conv...
asked by 18.09.2018 / 00:58
2
answers

Problem in MySQL Select query

I have a problem in a Query in MySQL, I currently have two tables, one of employees and one of places visited by that employee by date, the goal is to obtain through a query the list of all employees and the last place they visited, so far so go...
asked by 05.09.2018 / 20:17
1
answer

Help with data management in Oracle, how to use the TO_CHAR for a NUMBER data type?

I have a query which obtains data of type NUMBER in the BD, what I do is show the result of the query in a .csv file and at the time of showing that data the fields of type NUMBER which are (IMPORTE_UNO, IMPORTE_DOS) it does not show deci...
asked by 26.07.2018 / 06:29
3
answers

problesmas with mysqli_num_rows and mysqli prepared queries

Good afternoon community stack , I'm doing some queries prepared with mysqli the query is successful but if agrgo mysqli_num_rows throws me error. example this is the code that throws me wrong ... $me=$_SESSION["id"]; $name=$_SES...
asked by 24.08.2018 / 22:43
1
answer

Is it possible to generate consecutive ones based on the change of a column in SQL Server?

I have this case: I'm interested in SQL Server 2008, to be able to assign a row to the records but to reset it to 1 every time a date changes in the query. For example I have these data: And I am interested in generating a consecutiv...
asked by 01.12.2017 / 23:25
1
answer

Get related fields Django

Good day how can I bring the related fields from another table in django, for example I have two models Person and Location since when doing the queryset it only brings me the keys, but it does not bring all the fields of the related table. m...
asked by 11.11.2017 / 14:46
1
answer

SQL Bring top 1 or max

I have the following query: select top 1 fact.vend, fact.cliente, sum((detalle.precio-art.costo)*cant) as total from afacturas as fact inner join afacart as detalle on fact.comprob = detalle.comprob inner join aarticulos as art on detalle.cor...
asked by 26.11.2017 / 16:44
1
answer

How to show a start and end range grouped by states in MySql?

I have a table called documents with three registers id, number, state. What I want to do is get a query with the intervals (min and max) for each record. To be more descriptive if the table is filled, with the following data: | numero...
asked by 21.11.2017 / 06:05
1
answer

Perform a query using a select in HTML

Very good, I'm trying to make a query using the selected option in HTML select, which I named "filter", I create the dynamic options and with a switch I get the selected. The case is that from there I'm stuck do not know where to put the code th...
asked by 27.03.2018 / 17:48
3
answers

Get a word from a string in SQL Server 2008

I have a varchar field that contains a string with the following: "The Scenario is BUDGET; the Year is 2018; the period is June" The values of Scenario , Year and Period may vary. I am building a script, and part of w...
asked by 24.07.2017 / 21:28