Re: User variables in update statement

2007-07-10 Thread Baron Schwartz
Hi Scott, Scott Haneda wrote: Is it possible to use user variables in an update statement, I can find only scant docs on it, but they do not pertain to what I am trying to do. Given this select: SELECT user_id, order_status, quantity_chosen, month_price, each_price, sales_tax, sales_tax_rate,

Re: User Variables

2005-04-25 Thread Ed Reed
Does anyone else have any ideas about this topic? Thanks Ed Reed [EMAIL PROTECTED] 04/23/05 1:29 pm Thanks for the reply, I realize that user variables disappear when the connection closes but I don't understand why what I'm trying to accomplish can't be done. Doesn't it make since that if

Re: User Variables

2005-04-25 Thread SGreen
Ed Reed [EMAIL PROTECTED] wrote on 04/25/2005 02:33:23 AM: Does anyone else have any ideas about this topic? Thanks Ed Reed [EMAIL PROTECTED] 04/23/05 1:29 pm Thanks for the reply, I realize that user variables disappear when the connection closes but I don't understand why what

Re: User Variables

2005-04-23 Thread Chris
Ed Reed wrote: Thanks for the reply, So is there anyway to use User Variables with a single connection. All my apps are in VB6 and VBA. They all take a query, open a connection, run query, fill array from query results, close connection and pass back the array. Because of backward compatibility

Re: User Variables

2005-04-23 Thread Paul DuBois
At 22:04 -0700 4/22/05, Ed Reed wrote: Thanks for the reply, So is there anyway to use User Variables with a single connection. All my apps are in VB6 and VBA. They all take a query, open a connection, run query, fill array from query results, close connection and pass back the array. Because

Re: User Variables

2005-04-23 Thread Ed Reed
Thanks for the reply, I realize that user variables disappear when the connection closes but I don't understand why what I'm trying to accomplish can't be done. Doesn't it make since that if you can load a single file with multiple SQL commands and have that work succesfully then you should

Re: User Variables

2005-04-22 Thread Chris
Ed Reed wrote: If I run the following in MySQLFront v3.1 Set @A='Test'; Select @A; I get back same result +--+ | @A | +--+ | Test | +--+ If I run the same query in MySQL Query Browser v1.1.6 I get this, ErrNo 1060, You have an error in your SQL syntax; check the manual that

Re: User Variables

2005-04-22 Thread Ed Reed
Thanks for the reply, So is there anyway to use User Variables with a single connection. All my apps are in VB6 and VBA. They all take a query, open a connection, run query, fill array from query results, close connection and pass back the array. Because of backward compatibility there's no

RE: User variables

2004-12-13 Thread Jay Blanchard
[snip] This does not work. It appears that the user variable is not picked up in the WHERE clause - the query works fine if I have: [/snip] You have a fundamental lack of understanding of user variables. A quick read of http://dev.mysql.com/doc/mysql/en/Variables.html will reveal User variables

RE: User variables

2004-12-13 Thread lakshmi.narasimharao
Hi, Set the value as SET @SoftwareID:=7; Now, use WHERE s.softwareID = @SoftwareID at the end of your query. Thanks, Narasimha -Original Message- From: Erich Beyrent [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 8:30 PM To: [EMAIL PROTECTED]

Re: user variables and regexp

2004-10-07 Thread Paul DuBois
At 3:12 +0200 10/8/04, Przemyslaw Popielarski wrote: User variables do not work with REGEXP under MySQL 4.0.21 4.1.5. Is this a bug or a feature? It's difficult to provide an answer to this because you're providing no information about what do not work means. Can you be more specific? mysql set

Re: user variables and regexp

2004-10-07 Thread Przemyslaw Popielarski
Paul DuBois [EMAIL PROTECTED] wrote: User variables do not work with REGEXP under MySQL 4.0.21 4.1.5. Is this a bug or a feature? It's difficult to provide an answer to this because you're providing no information about what do not work means. Can you be more specific? Sure. I didn't

Re: user variables and regexp

2004-10-07 Thread Paul DuBois
At 3:47 +0200 10/8/04, Przemyslaw Popielarski wrote: Paul DuBois [EMAIL PROTECTED] wrote: User variables do not work with REGEXP under MySQL 4.0.21 4.1.5. Is this a bug or a feature? It's difficult to provide an answer to this because you're providing no information about what do not work

Re: user variables and regexp

2004-10-07 Thread Przemyslaw Popielarski
Paul DuBois [EMAIL PROTECTED] wrote: SELECT @a:=FIRMLEGALZIPCODE FROM tCustomers WHERE @a REGEXP [0-9] - Empty set (0.03 sec) You're expecting the value to be selected first so that you then can test it with the WHERE clause later. Of course you're right. Thanks. According to your

Re: user variables and regexp

2004-10-07 Thread Paul DuBois
At 4:01 +0200 10/8/04, Przemyslaw Popielarski wrote: Paul DuBois [EMAIL PROTECTED] wrote: SELECT @a:=FIRMLEGALZIPCODE FROM tCustomers WHERE @a REGEXP [0-9] - Empty set (0.03 sec) You're expecting the value to be selected first so that you then can test it with the WHERE clause later. Of

Re: User variables + SUM + GROUP BY = strange behavior

2004-04-16 Thread Vadim P.
well, it seems to be fine without SUM and GROUP BY... E.g., SELECT @a:=Charge, @b:=Cost, @[EMAIL PROTECTED] as Margin ... produces expected results. Emmett Bishop wrote: Vadim, if I'm not mistaken, you can't set a variable then use it in the same statement. See

Re: User variables + SUM + GROUP BY = strange behavior

2004-04-16 Thread Andrew Presley
P. [EMAIL PROTECTED] To: Emmett Bishop [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: User variables + SUM + GROUP BY = strange behavior Date: Fri, 16 Apr 2004 05:50:12 -0400 well, it seems to be fine without SUM and GROUP BY... E.g., SELECT @a:=Charge, @b:=Cost, @[EMAIL PROTECTED

Re: User variables + SUM + GROUP BY = strange behavior

2004-04-13 Thread Emmett Bishop
Vadim, if I'm not mistaken, you can't set a variable then use it in the same statement. See http://dev.mysql.com/doc/mysql/en/Variables.html A little ways down the page... The general rule is to never assign and use the same variable in the same statement. -- Tripp --- Vadim P. [EMAIL

Re: User Variables

2003-11-17 Thread Paul DuBois
At 12:05 PM + 11/17/03, Bruno Mustone wrote: Hi Guys, Do you know what version user variables were introduced? I can't seem to get them working in 3.22 and yet they work in 3.23. They were introduced in 3.23.6. -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB,

RE: User Variables

2003-11-17 Thread Bruno Mustone
Hmmm they seem to work in version 3.23.57. -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 18:38 To: Bruno Mustone; [EMAIL PROTECTED] Subject: Re: User Variables At 12:05 PM + 11/17/03, Bruno Mustone wrote: Hi Guys, Do you know what version

RE: User Variables

2003-11-17 Thread Paul DuBois
; [EMAIL PROTECTED] Subject: Re: User Variables At 12:05 PM + 11/17/03, Bruno Mustone wrote: Hi Guys, Do you know what version user variables were introduced? I can't seem to get them working in 3.22 and yet they work in 3.23. They were introduced in 3.23.6. -- Paul DuBois, Senior Technical

Re: User variables not working

2003-09-22 Thread Victoria Reznichenko
Director General: NEFACOMP [EMAIL PROTECTED] wrote: Is there anything I need to set in MySQL in order to use USER variables? No. What is wrong with user variables for you? -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net

Re: User Variables doesn't work?

2003-05-28 Thread ML
Brawley [EMAIL PROTECTED] wrote: Not just MySQLFront. PhpMyAdmin chokes on it, too. - - Original Message - From: ML To: [EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 9:08 AM Subject: Re: User Variables doesn't work? You are right, I tried from command

Re: User Variables doesn't work?

2003-05-27 Thread Peter Brawley
Not just MySQLFront. PhpMyAdmin chokes on it, too. - - Original Message - From: ML To: [EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 9:08 AM Subject: Re: User Variables doesn't work? You are right, I tried from command line and it works, the problem occurs with MySQL

Re: User Variables doesn't work?

2003-05-27 Thread Karam Chand
on it, too. - - Original Message - From: ML To: [EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 9:08 AM Subject: Re: User Variables doesn't work? You are right, I tried from command line and it works, the problem occurs with MySQL Front v2.5. This is strange

RE: User Variables

2002-05-09 Thread Paul DuBois
At 12:19 -0400 5/9/02, Luc Foisy wrote: hmm. ok i see what you are getting at but you do that every time you use a where clause, do you not? No, not really SELECT value FROM table WHERE value = 5 In this case value is used in the WHERE clause to determine which records to select. Once

RE: User Variables

2002-05-09 Thread Paul DuBois
At 11:57 -0400 5/9/02, Luc Foisy wrote: It may not make any sense to you, but it makes perfect sense to me Okay. Then it would seem that either: - I understand what you want to do, in which case you can't do it, because you're using SQL variables in a self-contradictory way. - I don't

Re: User Variables and Previous Row Question

2002-05-02 Thread Victoria Reznichenko
Jasmin, Thursday, May 02, 2002, 5:00:14 PM, you wrote: JB I have been trying to use 'user variables' to keep JB track of the previous row for use in a calculation of JB the present row. Is there a way I can do this? Or JB is there a better way in trying to use a previous JB rows value in the

Re: User Variables and Previous Row Question

2002-05-02 Thread Alexander Keremidarski
Hi, Jasmin Bertovic wrote: cut For example; SELECT number as current_day, (number - prevnumber) as change_from_prev_day FROM TABLE ORDER BY DATE prevnumber is the reference that I need from the previous row. Am I missing something simple or do I have to do this outside of MYSQL? 1. Yes you

Re: User Variables and Previous Row Question

2002-05-02 Thread Jasmin Bertovic
This makes sence, now that I have had some time to think about it. If I self join, I have to make sure that my data is continuous to shift all the rows by 1. Some of the things could have missing dates or maybe I could self join on an incremental counter using a tmp table. I have do go back to

Re: user variables

2001-06-12 Thread Paul DuBois
At 3:16 AM +0200 6/13/01, Luis A. Fdez. de Retana Aguirre wrote: Hello, My problem is about users variables. I want to do a script to create a database so: SET @dbname:=mydbname; CREATE DATABASE @dbname;# -- Don´t work CREATE DATABASE (SELECT @dbname);# -- Don´t Work

RE: User variables

2001-06-08 Thread Basil Hussain
Hi, Are there any issues with user variables ( SET @variable:=) overflowing memory on the server? At any one time I wouldn't need most of them, but I don't see any way of removing them once set. Might this be an issue, or is there some garbage collection and/or memory limit on the