SQL 1 « SQL « Java Database Q&A





1. Dynamic contact information data/desing pattern: Is this in any way feasible?    stackoverflow.com

I'm currently working on a web business application that has many entities (people,organizations) with lots of contact information ie. multiple postal addresses, email addresses, phone numbers etc. At the moment the ...

2. What is the best web based application to access a database    stackoverflow.com

Sometimes we deploy applications behind customer firewall and we need read only access to their DB for debugging issues as sometimes their IT people are not SQL savvy. We want to ...

3. Why recordsets initially were forward only    stackoverflow.com

I have seen recent updates in term of record sets being updated so that we can scroll back and forth through the data it points to. My question is why they were ...

4. How do I generate sql scripts for process definition deployment in jBPM?    stackoverflow.com

I'm looking into integrating jBPM with my current project, so far so good just including the jpdl jar in my ear and using the spring modules 0.8 jbpm module, however ...

5. Looking for an embeddable SQL beautifier or reformatter    stackoverflow.com

I am looking for a Java open source beautifier or reformatter for SQL that I can use to clean up DDL statements that I am generating with openArchitectureWare. Nothing in ...

6. How can I get this program to also print the first entry in the list too?    stackoverflow.com

I can't display the first entry from my query that returns multiple answers. For example, a search with a result set of five will return the second to fifth and ...

7. Link reports to Java? or Find means to apply BOLD format within Paradox 4.5?    stackoverflow.com

I need to read reports in Java from Paradox but I don't know how to do this. Can reports be imported through netbeans using a working driver? I have ...

8. Increasing Heap size for SQuirreL SQL on Max OS X    stackoverflow.com

I'm running SQuirreL SQL (2.6.8) on Max OS X. I'm running out of heap space when trying to create a Table script. Can anyone tell me how to configure SQuirreL SQL to ...

9. SQL Iterators    stackoverflow.com

Does anyone know good source where I can find about implementation of SQL iterator/Operator in java and any other languages? Than you, -Nimesh





10. "static checking" for SQL calls in Java/Eclipse?    stackoverflow.com

Writing Java in Eclipse, I've recently been bitten by a few trivial bugs where my SQL syntax has been off (e.g., not properly quoting a constant). Are there any tools I ...

11. Best practice for computing operation on consecutive records of a database: SQL or Java?    stackoverflow.com

For instance, I would like to compute the time elapsed between 2 events from the following table: CREATE TABLE Events (_ID INTEGER PRIMARY KEY, type INTEGER, time INTEGER) My question is should I ...

12. Implementing a virtual list in Java    stackoverflow.com

I need to fetch many records from an RDBMS in Java (10-20k) my target system expects them to be available as Java List. So I want to implement my code as ...

13. What are the main competitors to Servoy?    stackoverflow.com

Our company uses Servoy for rapid application development. It is a 4GL environment, that can target web-applications running in Tomcat as well as Java applications, all from the same program. While it ...

14. Combining Java with SQL?    stackoverflow.com

This isn't a code question for once, but it definitely has me confused. Basically, my lecturer has told me that we have a project due next semester that involves us to use ...

15. How to generate unique ID's on a cluster of web servers    stackoverflow.com

In the following scenario: 1 Database 4 Web servers How do the Web servers generate unique ID's for the database so that they are unique? Yes it's possible to use Auto-increment, but this is ...

16. Java SQL comprehension    stackoverflow.com

Are there Java classes for manipulating SQL statements? For example, break this statement

SELECT col1, col2 FROM table WHERE a = 1 AND b = 2 ORDER BY 1;
into some kind of map.
['select' ...





17. Scrabble board to board    stackoverflow.com

Is it best to communicate between two scrabble boards on separate computers by creating a cloud with a SQL table, simulating the board. And every time I move is made you ...

18. sql and database    stackoverflow.com

I have this method in my database class.and I want to get a part of data from a column which is "dateOfBirth" in MySQL table ,but I don't know why the ...

19. How can I provide users with the functionality of the DBUnit DatabaseOperation methods from a web interface?    stackoverflow.com

I am currently updating a java-based web application which allows database developers to create stored procedure regression test suites for database testing. Currently, for test setup, execution and clean-up stages, the user ...

20. Embedded SQL in OO languages like Java    stackoverflow.com

One of the things that annoys me working with SQL in OO languages is having to define SQL statements in strings. When I used to work on IBM mainframes, the languages used ...

21. Generic SQL Proxy - Does it exist?    stackoverflow.com

I am working on a concept product which tries to solve the domain problems of 'dynamic data masking'. This is an area where you don't get a lot of inputs when ...

22. Tips for a programmer with Dyslexia    stackoverflow.com

Does anybody have tips for a programmer who recently found they have a form of dyslexia? Currently any of the following would help...

  1. A suggested color scheme for Intellij (or any ...

23. user height and weight in sql    stackoverflow.com

We are planning to capture a user's height and weight and am looking for ideas on representing them in sql. I have the following questions in mind

  1. weight can be expressed in ...

24. FileFinder using SQL    stackoverflow.com

I was thinking of working on a project while I have some free time and this one looks pretty nice: http://mindprod.com/project/filefinder.html One thing I'm wondering about is that will it ...

25. How do you make long SQL invoked from other code readable?    stackoverflow.com

This is a very open question, but I think it can be very beneficial for SQL readability. So you have a Java program, and you are trying to call a monster SQL ...

26. Programming /open source / Beginner    stackoverflow.com

Possible Duplicate:
How to get involved in an open source project
I m a CS UG student Wanaa know How to participate in open source projects ...

27. SQL validation in IntelliJ IDEA: How to turn it off?    stackoverflow.com

Does anyone know how I turn off the SQL validation in Intellij IDEA 9? We often have more than one connection to a different type of database within one class. IntelliJ only ...

28. Logging SQL in Weblogic Server 8.13    stackoverflow.com

I am trying to print out the SQL statement that my EJB uses to create record in the database into a log file. Does anyone have any experience to do this. thank ...

29. is it a good idea to write a stored procedure for storing an XML in SQL?    stackoverflow.com

i want to write a stored procedure in java for SQL to parse and store the xml automatically in the corresponding tables is it a good idea or any one guide ...

30. curious case of hyphen and dash    stackoverflow.com

I am trying to fetch records from Oracle 9i database whose value are 'FOO - BAR' for a particular column. The 'FOO - BAR' condition values are present in the table, But ...

31. open source Java library of SQL utility functions?    stackoverflow.com

I am looking for a SQL utility library that allows me to do things like escaping strings for prefix search using LIKE or programmatically writing the WHERE part of the query ...

32. Does Java have a "IN" operator or function like SQL?    stackoverflow.com

I want to know of there's a way of doing something like this in Java :

if(word in stringArray) {
  ...
}
I know I can make a function for this but I ...

33. Using sets in JDO    stackoverflow.com

I have a model which contains a java.util.Set object as a member. How do I persist this using JDO? Specifically, how do I define the XML in the .jdo file?

class MyClass ...

34. What database to use?    stackoverflow.com

I'm new to databases, but I think I finally have a situation where flat files won't work. I'm writing a program to analyze the outcomes of multiplayer games, where each game could ...

35. How do I get all SQL keywords in Java?    stackoverflow.com

I need to have a list of all SQL keywords of particular DB engine in my Java program. I know that I can use DatabaseMetaData.getSQLKeywords() method from JDBC to list all DB ...

36. Any SVN like database solutions\librarys which are opensource and work OK with Java?    stackoverflow.com

I want to have my DB server opensource and capable of saving hystory of record changing. Meaning I do not want it to be way 2 complicated , I'd love to ...

37. Could some interfaces in java.sql and javax.sql be re-used for NoSQL?    stackoverflow.com

Other folks have asked about using SQL and NoSQL together, and subsequently whether there's a clean way of defining the access objects in a clean, generic way. My question is ...

38. Using LIKE operator in Access works but not in Java    stackoverflow.com

I'm making a java application for a toy store and using the MS-Access database. I'm using the operator "LIKE" to search for products in database using the user's keyword. E.g. in Access:

SELECT * ...

39. Is there any java library to format SQL?    stackoverflow.com

I am looking for a simple library [free] wherein i can use something like this:-

String formattedSQL = xyzLib.format ( sql );
Is there any such library? Or is there a way ...

40. SQL multi-command atomicity question    stackoverflow.com

I am trying to create a program that updates 2 different tables using sql commands. The only thing I am worried about is that if the program updates one of the ...

41. Find the nearest neighbour / latitude and longitude    stackoverflow.com

I have a table (DB2 database) with city information and corresponding latitude and longitude and many other info related to the city. My requirement is: Input to my application will be latitude ...

42. One reader thread, one writer thread, n worker threads    stackoverflow.com

I am trying to develop a piece of code in Java, that will be able to process large amounts of data fetched by JDBC driver from SQL database and then persisted ...

43. Java desktop app plus database plus internet    stackoverflow.com

i have to write small java database application with several tables. With that i have some experience and can do it. That would be on one machine. From somewhere on net, from other machine ...

44. Saving Password with Md5    stackoverflow.com

I am using Postgresql,hibernate and Java and I need to store a password. Can someone suggest me how to encrypt the password with md5. Else is there a better way to ...

45. how to iterate for all values of table1( using Java)?    stackoverflow.com

how to iterate for all values of table1( using java)?

say, table1 has values:
pkey  new_id<fkey>  old_id<fkey>
====================================
1 20  1787
2 24  1789
3 29  1793
From above table pkey say,for id=1 ...

46. Forking an application to two instances - one or two database instances?    stackoverflow.com

We have a working application based on JDBC and Oracle Database. There is a requirement to create another instance of the application. Newly created instance of the application would be designed ...

47. Escaping comma in java    stackoverflow.com

I have a string which is fed into the query as IN clause,which looks like this ('ACT','INACT') which is one of the parameters to a function inside a package.when a call ...

48. How to apply efficiently multiple position changes of a huge list in the database?    stackoverflow.com

I have a huge java list of simple objects, stored in the database, maintaining the position of the elements by a index column. I use hibernate but manage the list by ...

49. Is there a Javamail Store with an SQL backend?    stackoverflow.com

For awhile I've been using the simple Maildir service provider to store emails for my app. However now I need to structure the data along with statistics in a ...

50. How to test a method that returns all of the entities of a given type from the DB?    stackoverflow.com

I have a method getAll in my EmployeeDAO class that fetches all the employees in the database and returns a List<Employee>. How can I test this method?

public java.util.List<Employee> getAll() throws DataException;
...

51. Need help with Degrees of Separation using SQL & java program    stackoverflow.com

I'm trying my best but I am lost right now. I know that this is horrible code but can someone just try to help me with the syntax and the overall ...

52. DSL for pretty standard object model with a mapping to an SQL DB    stackoverflow.com

I need a DSL (for Xtext) for describing a pretty standard object model:

  • There are entities
  • They have fields which can either be primitives or references to other entities
  • References can be ...

53. Memory Leak when calling Stored Procedure    stackoverflow.com

I'm getting a memory leak somewhere in my program, and using some tools I think this is the location in my code. So, is there something wrong with this function ...

54. What is more appropriate way of managing Users, their roles, modules and permission?    stackoverflow.com

We have a web application where we need to create functionality to manage users, roles , modules and their permissions. Below is the design we have created. can anyone Let me ...

55. Which database implements which Java SQL type?    stackoverflow.com

The java.sql Javadoc defines SQL types in the java.sql.Types class. However, I can't find definitive information describing which type is implemented by which major database player (for me, this ...

56. Java and SQL topic    stackoverflow.com

I'm an undergraduate, majoring in Mathematics and Computer Science. I'm in my final year and I need a project topic (preferably designing an app in those 2 languages). It's very urgent- ...

57. Quick Java SQL problem    stackoverflow.com

My code:

String sql = "SELECT Publisher.Name, Book.Title, ShopOrder.OrderDate, SUM(OrderLine.Quantity) AS No_Books, "
            + "SUM(OrderLine.UnitSellingPrice * Orderline.Quantity) AS Total_Price"
   ...

58. Large numbers losing precision in SQLiteDB?    stackoverflow.com

I'm storing 0.00 decimal values as text in an SQLiteDB. I'm retrieving them by

"SELECT SUM(SUBSTR(amount, 1)) FROM record WHERE date BETWEEN '" +
    date1 + "' AND '" ...

59. Is there any good dynamic SQL builder library in Java?    stackoverflow.com

Anyone knows some good SQL builder library for Java like Squiggle (not maintained anymore it seems). Preferably, a project in active development. Preferably with syntax like

60. "Quick and Dirty" Facial Recognition and Database Storage/Lookup in Java    stackoverflow.com

For the last week I've been researching and experimenting with facial recognition. The intended application is for a person to be able to look up a person's information in a database ...

61. Storing a HashMap in an SQL database    stackoverflow.com

How do you store a HashMap inside of an SQL database? Also, how would you load that HashMap from a SQL database back into an instance of a HashMap? Okay, this is ...

62. SQL Database and Java    stackoverflow.com

I have a task to make an application that will connect Java with SQL database , when I served google I found that I have to download the JDBC driver of ...

63. LIKE in SQL work incorrectly?    stackoverflow.com

In my ejb-jar.xml

       <query>
            <query-method>
          ...

64. How to specify limit and offset in SQL    stackoverflow.com

I am working in java. I have one table,which is having 100 rows and 2 columns. Consider the following query:-

String id, lastId; 
ArrayList list=new ArrayList();
String query="select id from user limit 0,9";
selectStatement.execute(query);
ResultSet ...

65. Java: Check auto-generated ID    stackoverflow.com

My Java program adds items into database. I have a code for generating random string that will be used as an item ID. I want to make IDchecker(id) that will check ...

66. java library to maintain database structure    stackoverflow.com

My application is always developing, so ocasionally when the version upgrades some tables need to be created/altered/deleted, some data modified (generally some sql code needs to be executed). Is there any ...

67. java sql empty fields    stackoverflow.com

Hi i am trying to execute query

Statement stmt = conn.createStatement();
stmt.executeUpdate(location_query);
location_query is
insert into table(col, col2) value("2", "");
Both col and col2 are double(12,2) type, i get error Data truncated for column 'col2' at row ...

68. We need advice for a server software implementation with Java NIO    stackoverflow.com

I'm trying to calculate the load on a server I have to build. I need to create a server witch have one million users registered in an SQL database. During a week ...

69. Problem with SQL and question mark    stackoverflow.com

I'm trying to execute the script with PreparedStatemnent:

import java.sql.*;

public class DeclaredStatement {

  public static void main(String[] args) throws SQLException {

    try {      ...

70. Small footprint embedded Java SQL database    stackoverflow.com

I'm looking for an embedded SQL database for Java, with a small footprint. Something like SQLite, but it should be pure Java. So far I've seen HSQLDB, H2 and Apache Derby, ...

71. Re-define wait method in a Java interface    stackoverflow.com

I would like to use wait(int) as the signature of a method in a fluent API (used for http://www.jooq.org). The goal is to be able to construct SQL queries ...

72. How to fill a report dynamically?    stackoverflow.com

I have to generate reports from my application, first the user choose his search criteria then he validate his choice (search criteria:type of charts ,group by , etc) My question is: ...

73. Java JNI and ellipsis mess    stackoverflow.com

I have a function in c that adds a row to a table. The function takes as arguments various orderings of ints, floats, and strings by using an ellipsis add_row(int arg1, ...

74. Markov Chain: SQL Database and Java Representation    stackoverflow.com

Now this question is a bit obscure. I have a text-based markov chain that I've generated by parsing user-typed text. It is used to generate an almost-coherent string of gibberish and ...

75. Implementing SQL CHECKSUM in Java    stackoverflow.com

I have an existing database in SQL Server 2008 that performs user authentication via stored procedure for an existing PHP web application. The web application sends the stored procedure a ...

76. Can a map use java.text.Collator?    stackoverflow.com

Im using SQL Server 2008 R2. I have a data cache retrieved from the database and currently the way to get a string is via map.get(). However, some parts of the code ...

77. how can make this work in java    stackoverflow.com

I made a java application that read a text file and store it in a database.The database has 2 tables So in order to store the value of text i created ...

78. Removing Duplicated Java Code    stackoverflow.com

I have a class written in ~1000 lines of Java code that migrates one database over to another. It has 19 methods for each table being copied over, and 1 which load's ...

79. Invoke sql developer export options programatically    stackoverflow.com

I work with sql developer and I am able to export my query results with the sqldeveloper UI. Now since Sql developer seems to be java based, is there a way i ...

80. Java microseconds formatter    stackoverflow.com

In database, i have timestamp values like 2005-JAN-13 07:15:31.22222 I want to format above value in java to 2005-05-13 07:15:31.22222 fot this i used formetter: yyyy-MM-dd HH:mm:ss:SSSSS but when i use above formetter ...

81. What Java SQL-interface libraries let you work directly with SQL?    stackoverflow.com

I'm looking for a library that will let me work directly in native SQL, while still providing a nice Java-ish view of the database to the rest of my code. I'm familiar ...

82. Selenium Capture Screenshot and save to sql    stackoverflow.com

I need to know if there's a way for selenium rc to capture a screenshot, but instead of saving it as a .png to a specific directory , I want it ...

83. Tree like structure from SQL to HTML UL    stackoverflow.com

I have a tree like structure in database. I have a query that returns my records sorted just the way I want them displayed.

SELECT branch_id, branch_name, parent_branch_id, level FROM dw_branches
start WITH parent_branch_id ...

84. Java With SQL Mapper    stackoverflow.com

Ok this is what I'm trying to do. Let's say I have several views each view can have aliases and such like that and each view goes back to either another ...

85. Tool for creating DBManager classes in Java?    stackoverflow.com

Is there a tool for creating DBManager class for simple databases in SQL? I want to use it along with netbeans. I am working on a simple homework datamining project. But ...

86. How to develop a database software    stackoverflow.com

I need help to develop one small application, initially i want to make one database app using simple sqlite database in Desktop, later i would like to access tat database online. is ...

87. Java LINQ -like functionality    stackoverflow.com

Possible Duplicate:
LINQ for Java tool
In C# there is a capability to use LINQ statements in order to access a Collection as if writing a ...

88. Java Regex find/replace pattern in SQL comments    stackoverflow.com

I want to find/replace a character/pattern ONLY inside SQL comments ( single line comments -- and block comments /* */). The source string is an SQL script. At the moment ...

89. Java SQL [ limit | rownum ... ] uniformization API    stackoverflow.com

I'm faced with the task of adding "DB pagination" while executing the query and not while serving the user with results. The problem is that each DB engine has it's own approach ...

90. java library to export database from any DBMS to any DBMS    stackoverflow.com

Is there a java library that be able to export databases from any DBMS (Mysql,SQLServer,Oracle,SQLite,...) to any DBMS? Thaks

91. design: same logical computations needed both in database and in Java    stackoverflow.com

I am designing a web application that retrieves records from a database according to user search criteria. After retrieving results, another stage exists in the flow in which the results are ...

92. Carbonado: Unable to Acquire Lock    stackoverflow.com

I'm working on a Java program that uses Carbonado to interact with a SQL DB. I can read everything from the DB without an issue, but when I try to update values ...

93. how to programmatically mine tweeter sql dumps.    stackoverflow.com

I have a tweeter mysql dump. I want to build a classifier on this dump. I want to know whether there are packages available which i can use and what type of ...

94. Java scheduling Vs SQL scheduling    stackoverflow.com

Here is my requirement:

a date is inserted in to a db table with each record. Two weeks before that particulate date, a separate record should be entered to ...

95. SQL monitoring with JavaMelody, multiple databases    stackoverflow.com

I'm using JavaMelody to monitor my web application. The application connects to (through JNDI) 2 databases. In the JavaMelody webpage for my application I see the SQL queries that were executed ...

96. one-to-many filtering in media database    stackoverflow.com

With pms-mlx, I've been working on a media library to extend the functionalities of the ps3 media server for some time now and just recently discovered a ...

97. How to Generate Domain Classes From SQL DDL    forum.springsource.org

Hi everybody. I need to help me with this. Is there some method or tool to generate Domain Classes from SQL DDL or from a database connection? I want to have ...

98. problems with sql in tutorial    forums.netbeans.org

Jenya Posted via mailing list. Posted: Thu Aug 27, 2009 11:29 pm Post subject: problems with sql in tutorial Hi. I have the same problem. I'm trying to ...

99. SQL Filesystem    forums.netbeans.org

Yea - wouldn't that bee cool to have ! I have been dreaming about this for a while and had no time to look at it. But the idea could be ...

100. Auto completion for SQL keywords...    forums.netbeans.org

Hi Folk, I am a new user of NB and I have a question I wanna ask for. I was searching both in this forum and Google cause I have a ...