Questions tagged as 'sql'

1
answer

JTextField field [closed]

How to convert a JTextField component to type Date ? How to do research? How to create a query for the database by returning a list of requests according to a date range? Follow the code currently used: if (opcaoBusca.getSelect...
asked by 14.01.2015 / 17:51
1
answer

Composite primary key definition syntax in H2 Database engine

I'm trying to set a primary key consisting of two columns when creating a table in the H2 Database Engine ( link ) , but I did not find the syntax in the manual. Could you give me tips? For example: the syntax in MySql, Postgress ... Maybe some...
asked by 23.07.2018 / 23:13
1
answer

Alternative to PHPMyAdmin [closed]

Does anyone know how to tell me a database manager where I can assemble more complex queries without having to type the query? Just by clicking where I want to do a SELECT for example? I need to make multiple queries that involve a SELECT in...
asked by 23.07.2018 / 13:33
1
answer

Java Error NullPointerException in construction

main.java package projeto; import java.sql.*; import javax.swing.JOptionPane; import java.sql.Connection; import java.sql.Statement; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql....
asked by 20.05.2018 / 22:27
1
answer

How to put zeros after the digitizer digit - sql server

I need to put 9 zeros after 02:    0207200000053P 02- here are the zeros - 07200000053P that is coming from a variable called @vNossoNumero . How do I do this? Variable Select @vNossoNumero = case when @Conta='0000064-7' t...
asked by 28.08.2018 / 15:46
1
answer

Problem displaying a "select count (*)" in PHP

$result = $SQL->query("select count(*) AS codes_count from gamecodes WHERE gamecode='.$SQL->quote($gamecode).' AND alreadyused='N';")->fetch(); $counts = $result['codes_count']; echo $counts; When I run this SQL statement in the datab...
asked by 12.09.2014 / 20:27
1
answer

Catch only the value and format in 2 decimal places [closed]

Well, I have a python script that queries two different bases for checking values per day, one in SQLSERVER and one in Postgres. I used an if to tell if the values were different and if so, to warn. What happens and what was alarming even...
asked by 07.11.2018 / 19:44
3
answers

How to make an INNER JOIN bringing everything from two tables and one more "max" in a specific field?

Good people, to be more specific I have two tables. table 01: ...andtable02: ...andIwouldliketodoa"select" bringing all of these two tables, but where in the "dots" field (table 02) you have the highest number of points, how to do that? Eg...
asked by 16.11.2017 / 11:50
1
answer

Compare data from a table in PostgreSQL

Good morning. I have two tables in the same database, with the same name, but in different schemas. I want to compare the records you have in them, to see if there are identical data. Are there any software that does this?     
asked by 14.07.2017 / 16:46
2
answers

Linq equivalent to the t-sql command

How to make LINQ equivalent to the following SQL? Select sum(case when periodo = 1 then isnull(valor,0) else 0 end) Jan, sum(case when periodo = 2 then isnull(valor,0) else 0 end) Feb, sum(case when periodo = 3 then isnull(valo...
asked by 06.06.2018 / 21:20