Questions tagged as 'sql'

1
answer

Tanned system with Stored Procedure

I'm trying to make a stored procedure for a simple tanned system, my table is organized like this: Tanned id INT (11) - Auto Increment post INT (11) - foreign key (id - post) user INT (11) - foreign key (id - users) Users...
asked by 26.10.2018 / 23:02
1
answer

Build Query with JOINS

I have a query run on DB2: SELECT f.* FROM Fat f INNER EFat ef ON f.id = ef.id AND f.seq = ef.seq How do I reverse it in Java? I tried this way, but it gives error, all my classes are with their due...
asked by 26.10.2018 / 17:30
1
answer

How do I read PHP from MySQL from the bottom up? [duplicate]

My code is as follows:              //Receber o número da página $pagina_atual = filter_input(INPUT_GET,'pagina', FILTER_SANITIZE_NUMBER_INT); $pagina = (!empty($pagina_atual)) ? $pagina_atual : 1; //Setar a quantidad...
asked by 27.10.2018 / 17:18
1
answer

android.database.sqlite.SQLiteException: near "SQL": syntax error (code 1):, while compiling: SQL * FROM Employers WHERE id =?

I'm trying to make SELECT below passing a value as a parameter in the search, but it still gives the same error.    android.database.sqlite.SQLiteException: near "SQL": syntax error (code 1):, while compiling: SQL * FROM Employers WHER...
asked by 09.11.2018 / 07:32
1
answer

Limit amount of SQL information [closed]

How can I limit the number of rows in my SQL table? (without being limited in select, it's not like querying) eg, I have to have at most 10 information in the table, but it is not limiting, if 30 people register, the table will have 30 informati...
asked by 21.10.2018 / 22:01
1
answer

convert varchar to date oracle plsql

I need to convert a varchar to date so that I can filter all dates longer than a certain date, for example: I want all dates that are greater than November 2018 to be listed, I'm doing it as follows: DATA_FINAL > TO_DATE('1...
asked by 17.10.2018 / 16:48
1
answer

How to update a View?

I have a table where I check in and out of trucks. In this table there are two fields of type Date, I want to update the data of these fields. I'm using the following select. UPDATE V_TPL_ACOMPANHAMENTO SET E_POR = TO_DATE('08/10/18 22:24','...
asked by 16.10.2018 / 16:55
1
answer

String length in PL / SQL

CREATE OR REPLACE FUNCTION TamanhoString(texto char(100)) RETURN NUMBER IS tamanho NUMBER; BEGIN tamanho := LENGTH(texto); RETURN tamanho; END TamanhoString; I need to create a function that receives text as a parameter and returns...
asked by 18.10.2018 / 01:39
1
answer

Variable error stmt of type Statement

To try to execute the table, however in netbeans it is alerting the error in the line of ExecuteQuery.   Symbol: method executeQuery (String) location: variable stmt of type Statement The error is highlighted, netbeans alerts the message...
asked by 29.11.2018 / 10:37
1
answer

JOIN of 3 tables (LEFT JOIN)

I have a question regarding the best way (regarding performance and execution) to do the following select ... Initially I thought about using LEFT JOIN, but I came across some restrictions on its LEFT JOIN feature. Having 3 following tables:...
asked by 06.11.2018 / 00:44