Questions tagged as 'sql'

1
answer

Return All fields in the table (Function PostgreSql)

How can I make a postgresql function or stored procedure return all the columns of the table without having to specify them? I want to achieve the behavior of the Sql Server query Sp. With the code that I show, I get the error ERROR: la list...
asked by 01.04.2016 / 20:29
1
answer

Error: Using $ this when not in object context

I am using PHP, and JavaScript along with the highcharts library to generate a bar graph, but I get the following error:    Fatal error: Using $ this when not in object context in   C: \ xampp \ htdocs \ graphics \ index.php on line 55 W...
asked by 11.11.2016 / 05:21
2
answers

Add 4 columns of 4 different tables

I am doing an inventory system in which I must generate a table with a view called General Inventory which must add the values of four existing warehouses. In the database I have the four tables of which I must only add the number of pieces that...
asked by 14.04.2016 / 14:18
1
answer

Why do you repeat the data?

Good morning I'm doing a query on mysql trying to bring only one result per date but it's bringing me more than two results from the same date, someone to help me with what I have to remove or add to the query. SELECT DATE_FORMAT(fecha_pe...
asked by 01.08.2016 / 17:12
3
answers

Search in fields with HTML entities

I have a field in a MySQL database to which I have previously inserted HTML code; I also have a search engine that, when entering the word, searches for the results. The problem is that the data in HTML I have something like P & public that...
asked by 29.04.2016 / 01:06
0
answers

Laravel subqueries in query builder

I'm trying to understand how to create queries with subqueries in Query Builder. The problem is that the official documentation is extremely brief and not very explanatory in some specific points. In particular, the methods joinSub() and...
asked by 05.01.2019 / 19:12
0
answers

Does not show data in the select query

good morning, I have this query for my front of users, with PDO connection but in SQL SERVER but it does NOT show me any result as if it had nothing in the user table, but when I make an insert it is possible to insert the new user . What could...
asked by 02.01.2019 / 11:04
1
answer

Obtain a list of Products with a relation of 4 SQL Server tables

I'm trying to get a list of products sold in the last month, with a certain feature, which in this case would be your classification code. The question is that I have 4 related tables, Products, ClassificationProducts, DetailVentas, EncavesadoVe...
asked by 31.12.2018 / 21:05
1
answer

SQL query of all the questions except that the column "correct answers" of the other table is equal to 4

The purpose of the query is to show all the rows in the table "questionsService Operator"; except those in "correctResponse" have a value greater than 3 and except in the table "repliesTestUsuario" does not mention that numberQuestion. SE...
asked by 27.12.2018 / 21:53
0
answers

How to get the first day of the week ORACLE?

How can I get the first day of the week in ORACLE and the week that is for example 12/17/2018 - 12/23/2018 It would be week 51     
asked by 27.12.2018 / 13:20