dynamic sql using INTO

2010-02-17 Thread Cantwell, Bryan
I have a function built that will get me X percentile from my history table for last X days. It works fine as long as I hard code the certain values in where they go... what I really need to know is how can I make dynamic sql still do a select into a variable? simply replacing the '31' below

Re: Stored proc - dynamic sql in cursor

2008-10-17 Thread Olaf Stein
and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Thu, 16 Oct 2008 16:46:35 -0400 Subject: Re: Stored proc - dynamic sql in cursor From: [EMAIL PROTECTED] To: [EMAIL

Stored proc - dynamic sql in cursor

2008-10-16 Thread Olaf Stein
Hi all, I am running into some issues with what I am trying to do in a stored proc. Basically I am trying to find records related to certain individuals in other tables in the databases and if there are any, tell me how many. Instead of doing this for each of these tables individually I use a

Re: Stored proc - dynamic sql in cursor

2008-10-16 Thread Olaf Stein
:23 -0400 Subject: Stored proc - dynamic sql in cursor From: [EMAIL PROTECTED] To: mysql@lists.mysql.com Hi all, I am running into some issues with what I am trying to do in a stored proc. Basically I am trying to find records related to certain individuals in other tables

Re: Stored proc - dynamic sql in cursor

2008-10-16 Thread Rob Wultsch
On Thu, Oct 16, 2008 at 12:31 PM, Olaf Stein [EMAIL PROTECTED] wrote: Hi all, I am running into some issues with what I am trying to do in a stored proc. Basically I am trying to find records related to certain individuals in other tables in the databases and if there are any, tell me how

Re: Stored proc - dynamic sql in cursor

2008-10-16 Thread Olaf Stein
not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Thu, 16 Oct 2008 15:31:23 -0400 Subject: Stored proc - dynamic sql in cursor From: [EMAIL PROTECTED] To: mysql@lists.mysql.com

Re: Stored proc - dynamic sql in cursor

2008-10-16 Thread Olaf Stein
Thanks, The INTO clause I had totally disregarded... And I could do this outside the database I just have the cmd line client connected at all times anyway and like to quickly look up certain things... On 10/16/08 4:14 PM, Rob Wultsch [EMAIL PROTECTED] wrote: On Thu, Oct 16, 2008 at 12:31

Re: Stored proc - dynamic sql in cursor

2008-10-16 Thread Olaf Stein
is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Thu, 16 Oct 2008 16:14:39 -0400 Subject: Re: Stored proc - dynamic sql in cursor From: [EMAIL

create cursor from dynamic sql

2008-05-05 Thread Bryan Cantwell
I need to create a cursor using dynamic sql. Below is a short example of what I am trying to use in order to get the correct resultset... ignore the rest of the proc, I just need to know how to make the cursor declaration from @vsql Thanks DELIMITER $$ DROP PROCEDURE IF EXISTS `firescope

Re: dynamic sql in proc

2007-07-02 Thread ViSolve DB Team
Team. - Original Message - From: Bryan Cantwell [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Friday, June 29, 2007 4:03 AM Subject: dynamic sql in proc I have the following proc... when I run it I get a response that says You have an error in your SQL syntax; check the manual

dynamic sql in proc

2007-06-28 Thread Bryan Cantwell
I have the following proc... when I run it I get a response that says You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1. I just want a programatic way to upgrade db engine to innodb where I don't

Dynamic SQL

2002-03-04 Thread Craig Shepherd
Using UltraDev 4 with Phakt 1.2.1, linking to a MySQL server 3.22.23 I want to develop a SQL SELECT query where I can vary what customers are listed depending on the value of various form fields. For example if the check box surname_all is ticked then all customers are displayed if not then it

RE: Dynamic SQL

2002-03-04 Thread Trelfa, Jonathon
04, 2002 10:55 AM To: [EMAIL PROTECTED] Subject: Dynamic SQL Using UltraDev 4 with Phakt 1.2.1, linking to a MySQL server 3.22.23 I want to develop a SQL SELECT query where I can vary what customers are listed depending on the value of various form fields. For example if the check box surname_all

RE: Dynamic SQL

2002-03-04 Thread Craig Shepherd
statements in MySQL? -Original Message- From: Trelfa, Jonathon [mailto:[EMAIL PROTECTED]] Sent: 04 March 2002 16:34 To: [EMAIL PROTECTED] Subject: RE: Dynamic SQL Try using something a little different: if ($surname_all){ //checks to see if the variable is set $surname_query