select « Statement « Java Database Q&A





1. read a value from an SQL SELECT statement    jmeter.512774.n5.nabble.com

Hi, I want to query the database (via a select statement) for a value. I want to store this value in a variable and later use this value in order check the results of a HTTP POST request. For example the sql might check the database for the number of items in stock and then later an assertion should check ...

2. Using Distinct Keyword in Select statement    coderanch.com

Hi, I'm making a join involving 5 tables, all with primary and foreign keys. For example, if one table has a unique empno(for employee table),another table(vacation) has many values for that same empno depending on the number of vacations that empno has taken.The unique primary key for vacation is say vacationno. Now, when I make the join (which involves getting personal ...

3. Maximum length of a SELECT statement    coderanch.com

4. Will Select Statement work with Prepared Statment?    coderanch.com

The situation is that, i have a demo shopping cart, in which user click on checkbox(es) to add item(s) in his/her cart. I retrieve all checkbox(es) value from Form & insert it in a array object. That array object then transfer into Session. However i m trying to make a Select statment which pick those prod no. which is in array ...

5. Problems with Select statement...    coderanch.com

Hi. I am having a problem with a select statement I am executing in my program. I have successfully executed select statements using variables, but now I just want to use a specific value. When I execute the statement, I keep getting a "Result set has no current row". Could someone look at my code to see what I am doing ...

6. Combined insert select statement    coderanch.com

7. Select Statement and other    coderanch.com

I have two problems that I've been trying to solve for a week without getting any result. 1. I am having an unclosed string literal error when I run my select query. ResultSet rs = s.executeQuery(sql); I am not sure how I am supposed to close this string. Can you please help. String sql = "SELECT Pro.ProjectNumber, Pro.ProjectSubject, Pro.SeniorResearcher, Entry.EntryDesc, Pro.Status, ...

8. select statement    coderanch.com

9. Conditional select statement    coderanch.com





10. two select statements    coderanch.com

In my jsp page i have to show around 20 question which I am taking from db. For one of the question user need to select a state which again i have to query the db. Since the frst query is already running i dont know how to make the second select statement for the states? Hope I am clear and ...

11. Help with select statements    coderanch.com

15. How to make SELECT statement case sensitive?    coderanch.com

I agree, the proposed solution is the opposite of what you want. The problem is actually with the database itself. Some databases can be configured to perform case insensitive matching or not, and you need to check the database settings for this. I don't recall whether or not this configured on a table/field level granularity, you'd have to consult your database ...

16. How to count the execution time of my select statement?    coderanch.com

Within the next week or so I hope to release a new version of jamon that allows you to monitor a connection and that will automatically track jamon stats (hits/avg/min/max and more) for every query and other aspects of jdbc such as connection times etc. To enable this you will simply have to do the following. Sign up for the jamon ...





17. How get rowId in a select statement?    coderanch.com

Is there a way to do something equivalent to the following in a SQL select statement (either ANSI SQL or Transact-SQL is fine): SELECT ROWNUMBER(), Name FROM SomeTable Which would then print out: 1 Tom 2 Jack (And yes I know that an identity column would result in the same output, but there's no identity on the table I have to ...

18. Call a Stored Procedure inside of a SELECT statement    coderanch.com

Just wondering if it is possible to perform a stored procedure call within a select statement within T-SQL [in Sybase]. So maybe something like this: SELECT column1, column2, foobar = exec foobar(@foo, @bar) as 'foobar' FROM TABLE T (etc...) Mostly, I tend just to use loop using a cursor - but cursors are not that good for performance on Sybase databases... ...

19. SQL SELECT statement with strings?    coderanch.com

Hi all, I have a page where a user fills in a form field. When they hit submit the page is sent to a database checker page where I want to retrieve all rows in the table containing the string the user entered in the form field. I'm not sure how to write this SELECT statement. I get this error when ...

20. Retrieve results for both 'abc' and 'ABC': SELECT statement and WHERE clause has 'abc'    coderanch.com

Thanks for the responses. The JSP has only the Search field - no SQL. A button-click invokes a servlet which retrieves the results from DB. My search retrieves only case-sensitive results for 'doyle'. I am trying to see if at all there is any possibility of pushing the database to give me case-insensitive results by making only changes to the JSP ...

21. Max length of select statement    coderanch.com

22. Advanced SQL Select Statement. Please Help!    coderanch.com

I need some help in constructing an advanced sql select statement for report generation. This is my case: I need to produce a report for workers without wages for a period of time from certain department. My print report screen would have 2 dropdown fields - period and department. In order to identify those workers without wages, i need to search ...

24. paging (but not really) a SELECT statement via JDBC    coderanch.com

It seems that most people are interested in paging for one of two reasons: 1) They want to show only the first N results to the user, and not bother retrieving rows N+1 through 2N until the user asks for them. 2) They are worried about running out of memory if they process all the rows at once. Neither of these ...

25. What statement could you use in the WHERE clause to select all the rows in a table where no price is    coderanch.com

1) What statement could you use in the WHERE clause to select all the rows in a table where no price is defined? WHERE price IS NULL /* Returns rows where there is no value at all for price i.e. it is a true NULL or undefined value */ WHERE price != 0 /* Does what it says i.e. ...

26. jdbc select statement    forums.oracle.com

27. problem in jdbc select statement    forums.oracle.com

{{ public List dis(int getmodified,int getindex){ List outerList=null; outerList=new ArrayList(); List display=null; try{ System.out.println("testing.....3"); con=getconnection(); pstmt= con.prepareStatement("SELECT title from newss where nno >(10*(?)) and nno <=(10*?)"); pstmt.setInt(1,getmodified); pstmt.setInt(2,getindex); System.out.println("testing.....2"); //pstmt.setInt(1,pgno); rs=pstmt.executeQuery(); while(rs.next()) { display=new ArrayList(); display.add(rs.getString(1)); System.out.println("###########################" +rs.getString(1)); System.out.println("(((((((((((())))))))))" +display); outerList.add(display); } }catch(Exception e){ System.out.println ("exception in select statement" +e.getMessage()); } System.out.println("*************" +outerList); return outerList; }} my problem is it says ...