Questions tagged as 'sql'

1
answer

Transform javax.persistence.Query to ArrayList

It is possible to transform a javax.persistence.Query into ArrayList . I need to return an object of type Query but can not have all result values. I want to delete some results based on some tests, the code is below. I...
asked by 13.11.2014 / 03:24
1
answer

QUERY SELECT (oracle sqldeveloper)

Have the query below. SELECT 'A. ABERTOS' QUANTIDADE, (SELECT SUM(S) FROM (SELECT COUNT(*) S FROM VW_SOLICITACAO_DETALHE VW INNER JOIN SOLICITACAO SOL ON SOL.ID_SOLICITACAO = VW.ID_SOLICITACAO WHERE (VW.COD_TIPO_SERVICO IN (...
asked by 23.11.2014 / 03:13
1
answer

sp_executeSQL for each record in a table

I have the following problem: I need to analyze the differences between two databases, based on the existing tables and columns within these tables. My idea is to get the name of the columns inside the INFORMATION_SCHEMA of each bank and base...
asked by 10.02.2015 / 20:53
3
answers

Return the last entry of different Postgresql objects

Assuming I have two tables: Car containing: plate, year, ect .. Event containing: car, lat, long, date, time, etc. How could I return only the last entry of each car in the event table?     
asked by 12.02.2015 / 11:58
1
answer

help with SQL Nvarchar

Hello, I had some problems with a code in SELECT ... example: SELECT dados FROM banco WHERE CPF='$CPF' // com o código assim estava dando alguns erros pois o bd era em SQL e o Servidor windows. The solution was: SELECT CAST(C...
asked by 12.01.2015 / 17:36
1
answer

Sort table by name

I have a table, which shows all data in the SQLite database. I wanted to sort by name all the data and present them. I have a hyperlink that calls a function to sort. The problem is that it does not work. How can I make it to the table, on the s...
asked by 01.12.2014 / 13:12
1
answer

Error Running a Firebird Trigger

I have the following Trigger generated in my database: SET TERM ^ ; CREATE OR ALTER TRIGGER ATUALIZA_CODNCM FOR EST_ADICIONAIS ACTIVE BEFORE INSERT OR UPDATE POSITION 0 AS begin UPDATE est_adicionais set id_ncm = (select ncm.id from est_ad...
asked by 04.11.2014 / 17:04
1
answer

Fill in a parameter field in Crystal Reports

I have a report in Crystal Reports where I should pass parameters to the search, however one of these parameters must be filled with a default value that is nothing more than a field of type memo of a view of the database. This field sh...
asked by 08.09.2014 / 23:28
1
answer

maps, php, sql. Inserting coordinates into the database and reaver map (google) with these coordinates

I have a dynamic map (at least I would like it to be), I wanted it to depend on the user, it introduced the coordinates (based on a form) I wanted and they were entered into the database ... so far so good. But then how did you introduce these c...
asked by 19.09.2014 / 13:17
1
answer

Is there any technique for synchronizing a structure of a SQL Server database?

I have had some problems recently in making modifications to the approval environment and for bureaucratic reasons these modifications could not be inspected in the production environment and were done wrongly, causing a delay in identifying the...
asked by 18.09.2014 / 18:38