RE: How to return resultset from MySQL Stored Procedure using prepared statement?

2013-03-13 Thread Rick James
What language are you using? In Perl, there is $sth->more_results; > -Original Message- > From: Girish Talluru [mailto:girish.dev1...@gmail.com] > Sent: Wednesday, March 13, 2013 5:24 AM > To: mysql@lists.mysql.com > Subject: How to return resultset from MySQL Stor

Re: create single resultset from multiple sets

2008-12-02 Thread Andy Shellam
procedure (proc1) that calls another procedure (proc2) several times. I'd like to make proc1 return the proc2 results in a single resultset. How can this be done in mysql 5.0.51? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

create single resultset from multiple sets

2008-12-02 Thread Cantwell, Bryan
I have a procedure (proc1) that calls another procedure (proc2) several times. I'd like to make proc1 return the proc2 results in a single resultset. How can this be done in mysql 5.0.51? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Finding the 'page' number of a record, or its position in resultset

2006-10-18 Thread Gareth Adams
Jerry Schwartz the-infoshop.com> writes: > I'm still confused, are you saying that you want to know what page a team > would be on if you did a listing? > > Regards, Yes, given a query (e.g. "SELECT ... FROM teams ORDER BY score DESC, errors") which we usually add a LIMIT clause to for paginati

RE: Finding the 'page' number of a record, or its position in resultset

2006-10-18 Thread Jerry Schwartz
ews [mailto:[EMAIL PROTECTED] On Behalf Of Gareth Adams > Sent: Wednesday, October 18, 2006 11:47 AM > To: mysql@lists.mysql.com > Subject: Re: Finding the 'page' number of a record, or its > position in resultset > > Jerry Schwartz the-infoshop.com> writes: > > >

Re: Finding the 'page' number of a record, or its position in resultset

2006-10-18 Thread Gareth Adams
ot; which could then be used in a subquery or something (maybe not very efficient, but still more efficient than passing the entire resultset to the application where the searching could easily be slower depending on the language) Just my $0.02 Gareth -- MySQL General Mailing List For lis

RE: Finding the 'page' number of a record, or its position in resultset

2006-10-18 Thread Jerry Schwartz
- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Gareth Adams > Sent: Wednesday, October 18, 2006 11:25 AM > To: mysql@lists.mysql.com > Subject: Finding the 'page' number of a record, or its > position in resultset > > Hi, > > We have an application which

Finding the 'page' number of a record, or its position in resultset

2006-10-18 Thread Gareth Adams
Hi, We have an application which queries our database in 'pages', i.e. uses the same query repeatedly, with a different "LIMIT x, 20" to display blocks of 20 results. I'm wondering if there's an easy way (or any way) to find out where in the resultset a particu

Re: mysql export resultset to xml format

2005-11-28 Thread Ben Wilson
phpMyAdmin has the ability to export to XML format. If you take a look at its code, you may see what command is used to dump to XML. Specifically, the code for XML export is in /libraries/export/xml.php. May put you in the right direction. Ben On 11/28/05, prathima rao <[EMAIL PROTECTED]> wrote:

mysql export resultset to xml format

2005-11-28 Thread prathima rao
hi all, has anyone tried to export a data from a table to *.xml format i want a front end programme to do this automatically for example i have a database test in which table testing exists i want the data from that table to be exported in xml format at a click of a button regards rao --

Re: Using a Stored Procedure that returns a resultset

2005-11-25 Thread Martijn Tonies
ote: >CREATE PROCEDURE P_Select() >READS SQL DATA >begin >select * from enum_table; >end >How would I get a resultset? No need for an OUT param, just call the sproc, you'll see.

Re: Using a Stored Procedure that returns a resultset

2005-11-24 Thread Peter Brawley
>CREATE PROCEDURE P_Select() >READS SQL DATA >begin >select * from enum_table; >end >How would I get a resultset? No need for an OUT param, just call the sproc, you'll see. I tried that, but in Delphi with the particular component-set I'm us

Re: Using a Stored Procedure that returns a resultset

2005-11-24 Thread Martijn Tonies
> >CREATE PROCEDURE P_Select() > >READS SQL DATA > >begin > >select * from enum_table; > >end > >How would I get a resultset? > > No need for an OUT param, just call the sproc, you'll see. I tried that, but in Delphi with the particular compone

Re: Using a Stored Procedure that returns a resultset

2005-11-24 Thread Peter Brawley
Martin >CREATE PROCEDURE P_Select() >READS SQL DATA >begin >select * from enum_table; >end >How would I get a resultset? No need for an OUT param, just call the sproc, you'll see. PB - Martijn Tonies wrote: Hi there, I cannot figure out how to use a Stored P

Using a Stored Procedure that returns a resultset

2005-11-24 Thread Martijn Tonies
Hi there, I cannot figure out how to use a Stored Procedure that returns a resultset and I cannot find it in the documentation. For example: CREATE PROCEDURE P_Select() READS SQL DATA begin select * from enum_table; end I believe that CALL can only be used for output parameters, correct

Re: Creating a string from a resultset directly in SQL ?

2005-09-16 Thread Henri-Maxime Ducoulombier
>Take a look at the GROUP_CONCAT function, under "functions for use with >GROUP BY clauses" in the MySQL manual. You'll need MySQL 4.1+ AFAIK. Thanks a lot Jasper, that is EXACTLY what I was looking for ! Cheers -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To u

Re: Creating a string from a resultset directly in SQL ?

2005-09-16 Thread Jasper Bryant-Greene
Henri-Maxime Ducoulombier wrote: I have a question regarding the possibility of creating a string from a resultset directly using an SQL command. I'm not sure if this is possible. Here is what I have: A table with links between articles and category in a catalog. For ArticleID #1, I have

Creating a string from a resultset directly in SQL ?

2005-09-16 Thread Henri-Maxime Ducoulombier
Hello there, I have a question regarding the possibility of creating a string from a resultset directly using an SQL command. I'm not sure if this is possible. Here is what I have: A table with links between articles and category in a catalog. For ArticleID #1, I have say 3 categories,

Re: Java.lang.outOfMemoryError on large ResultSet

2004-10-20 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John McCaskey wrote: | The problem is not the memory on the database server, but on the client | running the JDBC connection. Seems that when you retrieve the result it | is trying to store everything in memory at once. | | Here is some info from the m

Re: Java.lang.outOfMemoryError on large ResultSet

2004-10-20 Thread John McCaskey
2000 Professional > > Table Size 1 Mil. Records. > > Table Structure: > Table1 > logid - autoincrement int(11) > Timestamp - timestamp > Timestamp2 - timestamp > Tag - varchar(15) > > > Query/Code: > --- > PreparedStatement pst = con.prepar

Java.lang.outOfMemoryError on large ResultSet

2004-10-20 Thread Amit_Wadhwa
elect logid,timestamp,Timestamp2,Tag from Table1"); Resultset rs = pst.executeQuery(); //getting java.lang.outOfMemoryError here, even before retrieving the resultset below. While (rs.next()) { //check something, do something.. } ... Tried the same thing above doing

Re: ResultSet NotUpdatabelProblem

2004-10-07 Thread Jeff Mathis
Its my impression that prepared statements are buggy with innodb tables. i've recently filed a bug, at heikki's request, where some buffer on the mysql server periodically flushes itself or otherwise is erased, with the result that the sql executed by a prepared statement is not what you think

Re: ResultSet NotUpdatabelProblem

2004-09-30 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: > Hello: > > I have recently posted the message attached at the bottom of > this one to the mailing list. Since then, I have continued to > work the sporadic and troublesome errors that are described in > that attached mes

Re: ResultSet NotUpdatabelProblem

2004-09-28 Thread contact
-- Hello: I am having a problem with an (not)updatable ResultSet that I cannot figure out. The problem is not consistent in that the exact SQL statements and tables involved will work one time and then fail the next. There does not appear to be any rhyme or reason as to when or why it fails.

RE: ResultSet NotUpdatable problem

2004-09-23 Thread lakshmi.narasimharao
Hi, help me in getting answer for the following What is the difference in MySql between transaction-safe tables (like Innodb or BDB) and non-safe Thanks, Narasimha Confidentiality Notice The information contained in this electronic message and any attachments to this messa

ResultSet NotUpdatable problem

2004-09-23 Thread contact
Hello: I am having a problem with an (not)updatable ResultSet that I cannot figure out. The problem is not consistent in that the exact SQL statements and tables involved will work one time and then fail the next. There does not appear to be any rhyme or reason as to when or why it fails. Once

RE: SQLException when retrieving resultset containing mediumint ( 4.1.2b-alpha-win db and java-3.1.2-alpha driver)

2004-06-28 Thread Victor Pendleton
Can you post the code or sql that you are attempting to execute that is throwing tis error? -Original Message- From: Oliver Chua To: [EMAIL PROTECTED] Sent: 6/28/04 5:08 AM Subject: SQLException when retrieving resultset containing mediumint (4.1.2b-alpha-win db and java-3.1.2-alpha

SQLException when retrieving resultset containing mediumint (4.1.2b-alpha-win db and java-3.1.2-alpha driver)

2004-06-28 Thread Oliver Chua
I'm using mysql-4.1.2b-alpha-win.zip and mysql-connector-java-3.1.2-alpha.zip to access db via JDBC. The column is mediumint(9) It was created using type mediumint, somehow it was changed to mdiumint(9) I think there may be a problem in the size... java.sql.SQLException: Unknown type '9 in column

Re: JDBC ResultSet exception

2004-04-29 Thread Josh Trutwin
On Thu, 29 Apr 2004 23:59:05 +0200 "Bjoern Wuest" <[EMAIL PROTECTED]> wrote: > Dear All > > > I work on a small application with database support. For development I use > the MySQL database which is just doing fine. During testing I experienced a, > in my opinion, strange bug. > > > I have the

JDBC ResultSet exception

2004-04-29 Thread Bjoern Wuest
tion conn = p_GetConnectionFromPool(); try { // Try to lock the database connection to have exclusive access for table locks synchronized (conn) { Statement stmt = null; ResultSet rSet = null; try {

Re: stored procedures returning a resultset/cursor

2004-04-14 Thread Daniel Kasak
Beer Joseph wrote: Hi, is it (mysql v5.0) or might it once be possible, to 'return' a cursor as an out parameter from a stored procedure? In MS SQL Server a stored procedure can return a 'recordset' by simply defining a select statement. In ORACLE one can define a ref cursor output parameter

stored procedures returning a resultset/cursor

2004-04-14 Thread Beer Joseph
Hi, is it (mysql v5.0) or might it once be possible, to 'return' a cursor as an out parameter from a stored procedure? In MS SQL Server a stored procedure can return a 'recordset' by simply defining a select statement. In ORACLE one can define a ref cursor output parameter and 'fill' it within t

ResultSet

2004-01-23 Thread Sidar LC.
Can stored procedure return a result set for my java program? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Anomaly in ResultSet

2003-07-26 Thread Karam Chand
@a,1,8),16,10)), sum(conv(substring(@a,9,16),16,10))) as b from email_table_copy group by id/1024 order by 1 limit 5; I get a resultset - id/1024 @a:=md5(email)b --- -

Anomaly in resultset

2003-07-25 Thread Karam Chand
@a,1,8),16,10)), sum(conv(substring(@a,9,16),16,10))) as b from email_table_copy group by id/1024 order by 1 limit 5; I get a resultset - id/1024 @a:=md5(email)b --- -

Re: Large resultset

2003-03-12 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roland Carlsson wrote: Thanks, that solved the problem. I thought that I could have my own fetch-size but I has now understood that Integer.MIN_VALUE is the only size that is accepted. Regards Roland Carlsson The fetch-size setting makes sense for drive

Re: Large resultset

2003-03-11 Thread Roland Carlsson
on" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, March 11, 2003 2:17 PM Subject: Re: Large resultset > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Roland Carlsson wrote: > > Hi! > > I have a query that returns a resultset of 70 mb. I&#

Re: Large resultset

2003-03-11 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roland Carlsson wrote: Hi! I have a query that returns a resultset of 70 mb. I'd somehow would like J/Connector to fetch only small pieces using Statement.setFetchSize but it still get the whole ResultSet at once and then I get an OutOfMemoryErro

Re: Large resultset

2003-03-11 Thread Roland Carlsson
Hello and thanks for your answer! If I have understood correctly LIMIT will only return as many row as the limit. I need all rows, but I can't handle them all at once. In JDBC there are a method to "stream" the resultset into small portions and when the end of the portio

Re: Large resultset

2003-03-11 Thread Roland Carlsson
Hello and thanks for the answer! I use the following code to create the statement and resultset: java.sql.PreparedStatement stat = conn.prepareStatement(sqlQ, java.sql.ResultSet.CONCUR_READ_ONLY); stat.setFetchSize(5); java.sql.ResultSet res = stat.executeQuery(); So I don't think the

AW: Large resultset

2003-03-11 Thread Rusch (ext) Reiner
PROTECTED] > Betreff: Large resultset > > > Hi! > I have a query that returns a resultset of 70 mb. I'd somehow > would like > J/Connector to fetch only small pieces using > Statement.setFetchSize but it > still get the whole ResultSet at once and then I get an &

Re: Large resultset

2003-03-11 Thread Alec . Cawley
> I have a query that returns a resultset of 70 mb. I'd somehow would like > J/Connector to fetch only small pieces using Statement.setFetchSize but it > still get the whole ResultSet at once and then I get an OutOfMemoryError. > Is it a bug in setFetchSize? Does J/Connector

Large resultset

2003-03-11 Thread Roland Carlsson
Hi! I have a query that returns a resultset of 70 mb. I'd somehow would like J/Connector to fetch only small pieces using Statement.setFetchSize but it still get the whole ResultSet at once and then I get an OutOfMemoryError. Is it a bug in setFetchSize? Does J/Connector ignore it? Have I to

Re: JDBC ResultSet

2001-08-24 Thread Maybin Muyeba
Hi, I am a relatively new user of mySQL. I have written a program that uses JDBC to access a mySQL database. I seem to find no other ResultSet metadata statements other than ResultSet.getMetadata().getColumnName(1), ResultSet.getString(1) etc and stuff. I can use ResultSet.getRow() though

number of records in a ResultSet

2001-07-12 Thread karel pitra
hi, please is there a way to get the number of records in a JDBC ResultSet ? something like mysql_num_rows in PHP. thanks karel pitra - Before posting, please check: http://www.mysql.com/manual.php (the manual

ResultSet Problem

2001-06-27 Thread AVDHUT SHEDGE
I am giving a query to MySQL which contains "order by RowNo".When i give this query on mysql prompt it gives me resultset in ascending order,but when i give the same query through java program(servlet) it gives me resultset in descending or any random order. before yesterday ever

Re: resultset problem

2001-04-18 Thread Sinisa Milivojevic
[EMAIL PROTECTED] writes: > hi, > > i have a problem with mysql 2.23.36. > so far it everything works fine but since today, i get wrong resultsets > from my sql-selects - even if i try them direct over the mysql sql-editor. > one minute it works fine and the next minute an empty or incomplete > r

resultset problem

2001-04-18 Thread KGoeker
hi, i have a problem with mysql 2.23.36. so far it everything works fine but since today, i get wrong resultsets from my sql-selects - even if i try them direct over the mysql sql-editor. one minute it works fine and the next minute an empty or incomplete recordset is returned. can somebody help

how to count rows in JDBC ResultSet ?

2001-01-19 Thread Dainius Ramanauskas
Hello, I want to know the number of rows in a JDBC-ResulSet just by calling a function like it's done in PHP with mysql_num_rows($result) There seems to be no such function in the ResultSet interface as defined in Java 2. cheers Oliver Do