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

User variables in update statement

2007-07-10 Thread Scott Haneda
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, @NEW_each_price:=(each_price

How to set "User" variables (not system/session ones) at database startup

2006-08-09 Thread Asif Lodhi
Hi, I want to set certain _user_ variables, which I will create myself, at the database startup time so that all clients can use the values stored [only one time at the beginning] in those variables instead of computing the same each time in triggers or other code. It's just like the package-lev

Re: need help with user variables in where clause of sub query

2005-12-29 Thread SGreen
Dan Rossi <[EMAIL PROTECTED]> wrote on 12/29/2005 07:19:13 AM: > Thanks for your kind words of opinion, if you feel you have a better > way please do go ahead , i am going to show you the sql i ended up > using which was a union to append the current summary at the end, i > then had to use php

Re: need help with user variables in where clause of sub query

2005-12-29 Thread Dan Rossi
Thanks for your kind words of opinion, if you feel you have a better way please do go ahead , i am going to show you the sql i ended up using which was a union to append the current summary at the end, i then had to use php afterwards to add up the totals as i was getting unexpected results whe

Re: need help with user variables in where clause of sub query

2005-12-28 Thread SGreen
Dan, You need to shoot your SQL tutor. Whoever taught you to write aggregate queries seriously took your money. You DO NOT need to use subqueries to do what you want to do. You do not need to write a full CREATE TABLE statement to create a temporary table (see other response). You do not need

Re: need help with user variables in where clause of sub query

2005-12-28 Thread Dan Rossi
I just tried to create a Function or Stored Procedure instead of making variables but it didnt even let me do this CREATE FUNCTION test (customerID, month, producerID) RETURN SELECT SUM(fu.bandwidth) FROM feed_usage fu WHERE fu.customerID=customerID AND fu.month=month AND fu.feedID IN (SELECT

Re: need help with user variables in where clause of sub query

2005-12-28 Thread Dan Rossi
Btwi dont want the column of a view to be a variable, i think thats what it thinks ! Im just needing to send the value of the current primary key field top a sub query ! Read my latest post if i can get around not using variables, and still manage to get the right values of a current row going

Re: need help with user variables in where clause of sub query

2005-12-28 Thread Dan Rossi
Um, thast exactly right each select is a list of results , i want to merge them then manipulate the data after putting them into a view, maybe a temp table is needed for this but i dont really want to do an entire create table statement aswell :\ On 29/12/2005, at 2:48 AM, [EMAIL PROTECTED] w

issue with user variables in a view

2005-12-28 Thread Dan Rossi
Ok i have simplified my query into sections i have discovered that mysql5 doesnt like user variables in a select statement when creating a view, i am required to setup user variables so i can send the current row value primary key to a sub query, i really wished i could just send the field to

Re: need help with user variables in where clause of sub query

2005-12-28 Thread SGreen
You seem to be coming at SQL with a COBOL perspective. Views are something you typically create just once and they stay updated automatically. They work like tables not like queries. Assigning variables to each column of a view doesn't make any sense (in the SQL sense of "view") as each column

Re: need help with user variables in where clause of sub query

2005-12-27 Thread Dan Rossi
I have an unfinished query, i am trying to test, basically im required to get the value of the current field in a row and use it for a subquery in that row :| Its not a working query, and im not asking for someone to fix it, however as u can see i need to send the customerID and month to the su

Re: need help with user variables in where clause of sub query

2005-12-27 Thread SGreen
Dan Rossi <[EMAIL PROTECTED]> wrote on 12/27/2005 11:39:57 PM: > Hi there i am trying to use usewr variables in a select statement to > add to a where clause in a sub query. Ie > > select @id:=id,@month:=month, (select SUM(totals) from table where > [EMAIL PROTECTED] and [EMAIL PROTECTED]) as t

need help with user variables in where clause of sub query

2005-12-27 Thread Dan Rossi
Hi there i am trying to use usewr variables in a select statement to add to a where clause in a sub query. Ie select @id:=id,@month:=month, (select SUM(totals) from table where [EMAIL PROTECTED] and [EMAIL PROTECTED]) as totals from table its happened on other occasions ie with calculations a

Calculations on user variables

2005-09-28 Thread Dan Rossi
Hi there I am experiencing a wierd bug in mysql 4.1 which is working in Mysql5 beta where i am trying to run calculations on user variables. I use these to pass values to sub queries. FORMAT((IF(c.bandwidth_limit=0, ((c.monthly_price/@count)*f.percentage_paid)[EMAIL PROTECTED], ((@[EMAIL

Re: Maximum number of user variables

2005-05-12 Thread Neculai Macarie
ALSO, before you start, make a backup of your data (mysqldump works well > for most people). That way if you hose it up in some major way, you can at > least get back to where you started without too much pain. > > If you have any questions, I will be lurking ;-) Thanks for this so

Re: Maximum number of user variables

2005-05-12 Thread SGreen
"Neculai Macarie" <[EMAIL PROTECTED]> wrote on 05/12/2005 03:26:33 AM: > > >> Not that I'm aware of. What type of conversions are you doing that you > > >> need 30,000 use vars? An easy solution would be to try it and find out > :) > > > > > > I need to move multiple linked entries (in around 12

Re: Maximum number of user variables

2005-05-12 Thread Eric Bergen
It sounds like you should be doing the link preservation and number update part in php or perl. Neculai Macarie wrote: Not that I'm aware of. What type of conversions are you doing that you need 30,000 use vars? An easy solution would be to try it and find out :) I need to move multi

Re: Maximum number of user variables

2005-05-12 Thread Neculai Macarie
> >> Not that I'm aware of. What type of conversions are you doing that you > >> need 30,000 use vars? An easy solution would be to try it and find out :) > > > > I need to move multiple linked entries (in around 12 tables) from one > > running server to another. I'm using auto_increment's all over

Re: Maximum number of user variables

2005-05-11 Thread Dominicus Donny
- Original Message - From: "Neculai Macarie" <[EMAIL PROTECTED]> To: "Mysql" Sent: Thursday, May 12, 2005 1:20 PM Subject: Re: Maximum number of user variables Not that I'm aware of. What type of conversions are you doing that you need 30,000 use vars? A

Re: Maximum number of user variables

2005-05-11 Thread Neculai Macarie
> Not that I'm aware of. What type of conversions are you doing that you > need 30,000 use vars? An easy solution would be to try it and find out :) I need to move multiple linked entries (in around 12 tables) from one running server to another. I'm using auto_increment's all over the place and I

Re: Maximum number of user variables

2005-05-11 Thread Eric Bergen
Not that I'm aware of. What type of conversions are you doing that you need 30,000 use vars? An easy solution would be to try it and find out :) -Eric Neculai Macarie wrote: Hi! What is the maximum number of user variables that I can have in MySQL ? (I need to transfer a application fro

Maximum number of user variables

2005-05-11 Thread Neculai Macarie
Hi! What is the maximum number of user variables that I can have in MySQL ? (I need to transfer a application from one server to another and I need to rebuild the links between tables with new id's on the new server (I'm using auto_increment extensively), and I have a solution that inv

User variables in UPDATEs vs. SELECTs

2005-05-07 Thread Chris
atement works as is, with no prior setting of @iOrder or @mGroup0. How do the User variables in an UPDATE statement act differently than in a SELECT statement? Thanks, Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

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 us

Re: User Variables

2005-04-24 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

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 succesf

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-22 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-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'

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 correspo

User Variables

2005-04-22 Thread Ed Reed
I'm having trouble using user variables and I hope someone can help, My test environment is MySQL 4.1.11 on WindowsXP with MyODBC 3.51.11 If I open a command line client, I can do this mysql> SET @A='Test'; Query OK, 0 rows affected (0.00 sec) mysql> Sel

RE: User variables

2004-12-13 Thread lakshmi.narasimharao
] Subject: User variables I am having a problem with a query: SET @SoftwareID = 7; SELECT s.softwareID, s.softwareName, s.softwareVersion, s.softwareCreated, s.softwareChanged, b.buildName, s.supportFlag, s.softwareDesc

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 vari

User variables

2004-12-13 Thread Erich Beyrent
I am having a problem with a query: SET @SoftwareID = 7; SELECT s.softwareID, s.softwareName, s.softwareVersion, s.softwareCreated, s.softwareChanged, b.buildName, s.supportFlag, s.softwareDesc, s.softwareLicense, s.s

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.

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. Accor

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 abo

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 wo

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

user variables and regexp

2004-10-07 Thread Przemyslaw Popielarski
User variables do not work with REGEXP under MySQL 4.0.21 & 4.1.5. Is this a bug or a feature? -- ./ premax ./ [EMAIL PROTECTED] ./ koniec i bomba, a kto czytal ten traba. w.g. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: assigning values to user variables in the mysql client

2004-07-27 Thread Michael Stassen
You have the wrong syntax. You need SELECT @CourseId:= CourseId FROM Course WHERE CourseId='ENGL'; See the manual for more. Michael Boyd E. Hemphill wrote: I would like to do something like this in the mysql client Select CourseId Into @CourseId

assigning values to user variables in the mysql client

2004-07-27 Thread Boyd E. Hemphill
I would like to do something like this in the mysql client Select CourseId Into @CourseId >From Course Where CourseCd='ENGL'; I also tried @CourseId = select CourseId from Course where CourseCd = 'ENGL'; Neither syntax works. So I am wondering if there is a way to assign values using SQL in t

User variables & optimization of IF()

2004-07-07 Thread Tom Cunningham
Hi everybody. I generally try to parametrize out my queries as much as possible with user-variables. So, say you have a general query for all users: --- SELECT ... FROM users --- It's nice to do this: SET @USER_ID:= NULL; SELECT ... FROM users WHERE IF(@USER_ID IS NOT NULL,[EMAIL PROT

User variables & optimization of IF()

2004-07-06 Thread Tom Cunningham
Hi everybody. I often try to parametrize out my queries as much as possible with user-variables. So, say you have a general query for all users: --- SELECT ... FROM users --- It's nice to do this: SET @USER_ID:= NULL; SELECT ... FROM users WHERE IF(@USER_ID IS NOT NULL,[EMAIL PROTECT

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

2004-04-16 Thread Andrew Presley
: "Vadim 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

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 http://dev.mysql.com/d

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 PR

User variables + SUM + GROUP BY = strange behavior

2004-04-13 Thread Vadim P.
Sorry, the message got garbled, here is a more digestible look: -Original Message- Hello all, Could anyone comment on User Variable behavior in the example below? Thanks, Vadim. = mysql> SELECT -> LEFT(CallT

User variables + SUM + GROUP BY = strange behavior

2004-04-13 Thread Vadim P.
Hello all, Could anyone comment on User Variable behavior in the example below? Thanks, Vadim. = mysql> SELECT -> LEFT(CallTime,10) AS CallDate, -> @a := SUM(Charge), -> @b := SUM(Cost),

User Variables in SELECT statement and LIKE syntax

2004-02-02 Thread Bobby Swarthout
These are the statements that are currently giving me the problems. SELECT @main_id:=ID, @FCSecID:=FCSecID, @Periodicity:=Periodicity, @EOP:=EOP FROM main_data_temp WHERE checked=0 ORDER BY fcsecid ASC LIMIT 1; SELECT * FROM actuals WHERE [EMAIL PROTECTED] AND Period LIKE '[EMAIL PROTECTED]'; # A

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 Tech

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 wha

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 MyS

User Variables

2003-11-17 Thread Bruno Mustone
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. Best regards, Bruno Mustone

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 T

User variables not working

2003-09-22 Thread Director General: NEFACOMP
Hi group, Is there anything I need to set in MySQL in order to use USER variables? Thanks, __ NZEYIMANA Emery Fabrice NEFA Computing Services, Inc. P.O. Box 5078 Kigali Office Phone: +250-51 11 06 Office Fax: +250-50 15 19 Mobile: +250-08517768 Email: [EMAIL

Strange behavior -- user variables in 4.0.14b

2003-09-02 Thread Bill Easton
I get the following strange behavior with a user variable. @T has the value 0 to start; after adding 1 to @T a few times, it ends up with a clearly incorrect value. I'd expect it to have a value of 280 after the second select. -- SELECT @T -- +--+ | @T | +--+ |

User Variables on Startup

2003-06-30 Thread Ray Elenteny
I would like to be able to set a user variable on startup of MySQL. I have review the documentation and searched the archives and I haven't seen anything about being able to do, or not do this. Can this be done? Since I'm unable to find reference to it, my guess is no, but I thought I'd give the

Re: User Variables doesn't work?

2003-05-28 Thread ML
lyog > > Karam > --- Peter Brawley <[EMAIL PROTECTED]> > wrote: > > Not just MySQLFront. PhpMyAdmin chokes on it, too. > > > > - > > - Original Message - > > From: ML > > To: [EMAIL PROTECTED] > > Sent: Tuesday, May 27, 2003

Re: User Variables doesn't work?

2003-05-27 Thread Karam Chand
hpMyAdmin 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 > work

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

user variables in ODBC

2002-09-23 Thread Klavs bryld
It seems like MyODBC (or ODBC in general ?) cannot accept user variables. The following query works OK when quering directly through the API but doesnt work via MyODBC Any suggestions to some workaround allowing the use of user variables??? SELECT id, @s:="", @o:=objekter.overs

Transactions, Deadlocks, User Variables and Replication

2002-07-16 Thread Paul Houle
d with it until I can make it deadlock?) * In section 4.10.4 it says "Update queries that use user variables are not replication-safe (yet)" -- Is this still the case? -- If so, will this be fixed in the near future? My plan is to store a list of update statements that t

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 unders

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 sel

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 and Previous Row Question

2002-05-02 Thread Alexander Keremidarski
Hi, Jasmin Bertovic wrote: >For example; > >SELECT number as current_day, (number - ) >as change_from_prev_day FROM TABLE ORDER BY DATE > > 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 are missing

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 prev

User Variables and Previous Row Question

2002-05-02 Thread Jasmin Bertovic
I have been trying to use 'user variables' to keep track of the previous row for use in a calculation of the present row. Is there a way I can do this? Or is there a better way in trying to use a previous rows value in the present row. For example; SELECT number as current_day, (num

User-variables weirdness... initialized or not?

2002-03-07 Thread Stig Nørgaard Jepsen
You have this table: id data 3 2 2 1 1 3 This query: SELECT @var, data, @var:=data+(IFNULL(@var,0)) FROM table What would result would you expect the first time you execute the query? I would expect this: NULL, 2, 2 2, 1, 3 3, 3, 6 But this is what you get the first time: NULL, 2, 2 NULL, 1, 1

MySQL - user variables

2002-02-13 Thread Luc Foisy
Perhaps I should have split this up into two mails, but I saw them related in the difference of databases On mysql Ver 11.12 Distrib 3.23.32, for pc-linux-gnu (i686) this works SELECT SQL_BUFFER_RESULT DATE_FORMAT(ORDERHEADER.AvailableAt,'%y/%m/%d') AS 'Date', (@tl:=SUM(IF(DISPATCHLOG.ID_STATU

MySQL - user variables

2002-02-07 Thread Luc Foisy
Perhaps I should have split this up into two mails, but I saw them related in the difference of databases On mysql Ver 11.12 Distrib 3.23.32, for pc-linux-gnu (i686) this works SELECT SQL_BUFFER_RESULT DATE_FORMAT(ORDERHEADER.AvailableAt,'%y/%m/%d') AS 'Date', (@tl:=SUM(IF(DISPATCHLOG.ID_STATU

RE: Problem with UPDATE and User Variables

2002-01-24 Thread Peter Bremer
Ooops!! This seems to be a bug in EMS MySQL Manager... Sorry to bother you all... Regards Peter -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: do 24 jan 2002 18:51 To: Peter Bremer; Mysql (E-mail) Subject: Re: Problem with UPDATE and User Variables At

Re: Problem with UPDATE and User Variables

2002-01-24 Thread Paul DuBois
At 18:32 +0100 1/24/02, Peter Bremer wrote: >Hi, > >Can anybody explain why the following does not work? > > SELECT @variable := value1; > UPDATE table SET field1 = @variable WHERE field2 = value2; > >The result is always that field1 is set to NULL... Works for me, if I substitute a real valu

Problem with UPDATE and User Variables

2002-01-24 Thread Peter Bremer
Hi, Can anybody explain why the following does not work? SELECT @variable := value1; UPDATE table SET field1 = @variable WHERE field2 = value2; The result is always that field1 is set to NULL... Regards, Peter Bremer

RE: When were user variables introduced ?

2001-12-28 Thread Carsten H. Pedersen
> Hi > > I'm trying to use user variables such as @myvar within a query which I've > got running perfectly on a 3.23.35a server , however, i can't get the same > query to run on 3.22.32 server :( > > Does anyone know if 3.22.32 supports user variables ? 3.2

When were user variables introduced ?

2001-12-28 Thread Girish Nath
Hi I'm trying to use user variables such as @myvar within a query which I've got running perfectly on a 3.23.35a server , however, i can't get the same query to run on 3.22.32 server :( Does anyone know if 3.22.32 supports user variables ?

Pb with user variables

2001-10-23 Thread Rue, Vincent
By reading the online manual-split.tar, I try to do some examples but one doesn't work. (For this time, I didn't configure mysql). To (re)-product this error: CREATE TABLE shop ( article INT(4) UNSIGNED ZEROFILL DEFAULT '' NOT NULL, dealer CHAR(20) DEFAULT '' NOT NULL

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);# <--

user variables

2001-06-12 Thread Luis A. Fdez. de Retana Aguirre
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 I have tried to define @dbname=mydbname directly but it blocks.

Re: Why can't I set user variables from a SHOW statement?

2001-06-09 Thread Sinisa Milivojevic
er which combinations of syntax I try. > > Is setting user variables only supported via the SET and SELECT statements? > I think it's a shame that setting variables from SHOW results is missing. I > think that this functionality should be added to MySQL as it could be handy > in

RE: User variables

2001-06-08 Thread Eric Ellis
? >From: "Basil Hussain" <[EMAIL PROTECTED]> >To: "Eric Ellis" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> >Subject: RE: User variables >Date: Fri, 8 Jun 2001 16:33:43 +0100 > >Hi, > > > Are there any issues with user variables ( SET @v

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 collect

Why can't I set user variables from a SHOW statement?

2001-06-08 Thread Basil Hussain
Hi all, Is there any reason why I can't do something like any of the following? SET @blah := SHOW VARIABLES LIKE 'server_id'; SHOW @blah := VARIABLES LIKE 'server_id'; It doesn't seem to work no matter which combinations of syntax I try. Is setting user variab

User variables

2001-06-07 Thread Eric Ellis
Are there any issues with user variables ( SET @variable:=) overflowing memory on the server? I am considering using user variables to implement a simple psuedo stored procedure API whereby an API user can set variables for a query in one function, and call the query later on in another

Re: SELECT, LEFT JOIN, and user variables

2001-03-15 Thread Michael Widenius
Hi! > "Gary" == Gary Shea <[EMAIL PROTECTED]> writes: Gary> Today, Sinisa Milivojevic ([EMAIL PROTECTED]) wrote: >> [EMAIL PROTECTED] writes: >> > >Description: >> > >> > It appears that if a column generated by a select is >> > a sum of variables generated in other columns of the >

Re: SELECT, LEFT JOIN, and user variables

2001-03-12 Thread Sinisa Milivojevic
Gary Shea writes: > > Sorry, this is my fault for not describing the problem better. > Here's the result I get with DISTINCT (I've given the columns > names to make the table smaller, but not changed the SQL from what > I sent in the bug report): > > +---+ > | i | > +---+ > | 1 | > |

Re: SELECT, LEFT JOIN, and user variables

2001-03-11 Thread Gary Shea
Today, Sinisa Milivojevic ([EMAIL PROTECTED]) wrote: > [EMAIL PROTECTED] writes: > > >Description: > > > > It appears that if a column generated by a select is > > a sum of variables generated in other columns of the > > select (see example below!), the column will have a > >

Re: SELECT, LEFT JOIN, and user variables

2001-03-11 Thread Sinisa Milivojevic
[EMAIL PROTECTED] writes: > >Description: > > It appears that if a column generated by a select is > a sum of variables generated in other columns of the > select (see example below!), the column will have a > bogus result if the select is 'DISTINCT'. If the > DISTINCT

SELECT, LEFT JOIN, and user variables

2001-03-10 Thread shea
>Description: It appears that if a column generated by a select is a sum of variables generated in other columns of the select (see example below!), the column will have a bogus result if the select is 'DISTINCT'. If the DISTINCT keyword is dropped, the column is generated

RE: user variables length

2001-02-15 Thread Wayne Fool
> -- > From: Entryon Corp., Chief Technical Officer - P. > Hasenfratz[SMTP:[EMAIL PROTECTED]] > Sent: Thursday, February 15, 2001 12:13 PM > To: mysql EN > Subject: user variables length > > How many Bytes can I save in a user variable?

user variables length

2001-02-15 Thread Entryon Corp., Chief Technical Officer - P. Hasenfratz
How many Bytes can I save in a user variable? Because I have the following strategy: I want to save all PrimaryKeys in a user variable SELECT @a:=' '; SELECT @a := CONCAT(@a, ', ', TPrimKey) FROM table WHERE ; so it is very important to know how many bytes can be stored. regards Philipp Has