ir>
From: "Dobromir Velev" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
Cc: "MySQL" <[EMAIL PROTECTED]>
References: <001901c2bfe4$58e8dda0$[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<00ad01c2c010$45ee73a0$dc4fc7d9@mep
On Monday 20 January 2003 08:22, Octavian Rasnita wrote:
> But I don't want to perform a 15 - id, meaning 15 - 10.
> I want to calculate 5 - id, meaning 5 - 10.
>
> It should give me -5 or 5 but not | 18446744073709551611 |
The result of the above expression is UNSIGNED, because column 'id' is INT
AIL PROTECTED]>
To: "Stefan Hinz, iConnect (Berlin)" <[EMAIL PROTECTED]>; "Brian
Lindner" <[EMAIL PROTECTED]>
Cc: "MySQL" <[EMAIL PROTECTED]>
Sent: Monday, January 20, 2003 08:22
Subject: Re: Substraction
> But I don't want to perform a 15 - i
Connect (Berlin)" <[EMAIL PROTECTED]>
To: "Brian Lindner" <[EMAIL PROTECTED]>; "Octavian Rasnita"
<[EMAIL PROTECTED]>
Cc: "MySQL" <[EMAIL PROTECTED]>
Sent: Monday, January 20, 2003 1:09 AM
Subject: Re: Substraction
Brian,
> > create
"MySQL" <[EMAIL PROTECTED]>
Sent: Monday, January 20, 2003 01:09
Subject: Re: Substraction
> Brian,
>
> > > create table test(id int unsigned);
> > > insert into test values(10);
> > > select 15 - id from test;
> > > The result is 18446744073
On Sun, 2003-01-19 at 19:09, Nasser Ossareh wrote:
> Isn't there a typo somewhere...
> Shouldn't you expect 5 instead of -5 (15 - id where id = 10)??
>
> Nevermind, let's assume that there is a typo somewhere and the correct expected
>value is -5... however, in the domain of unsigned arithmet
ian Lindner" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
Cc: "MySQL" <[EMAIL PROTECTED]>
Sent: Sunday, January 19, 2003 10:28 PM
Subject: Re: Substraction
> Octavian,
>
> Sunday, January 19, 2003, 7:31:57 AM, you wrote:
> >
Lindner <[EMAIL PROTECTED]>
X-Priority: 3 (Normal)
Message-ID: <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
CC: "MySQL" <[EMAIL PROTECTED]>
Subject: Re: Substraction
In-Reply-To: <001901c2bfe4$58e8dda0$[EMAIL PROTECTED]>
References
Octavian,
Sunday, January 19, 2003, 7:31:57 AM, you wrote:
> Hi all,
> I've tried the following query:
> create table test(id int unsigned);
> insert into test values(10);
> select 15 - id from test;
> The result is 18446744073709551611 instead of -5.
I ran this.. and it worked for me
MySql 4
Hi all,
I've tried the following query:
create table test(id int unsigned);
insert into test values(10);
select 15 - id from test;
The result is 18446744073709551611 instead of -5.
Am I doing something wrong?
Thank you.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
-
Hi.
On Mon 2002-11-04 at 15:24:19 -0600, [EMAIL PROTECTED] wrote:
> More appropriately, use curdate()feature from within sql.
>
> select * where date= < curdate()-1;
Two points:
- How does this relate to the origianl question? He wanted to know how
to calculate a time interval.
- The above h
TED]
Subject: Re: mysql DATETIME substraction problem/?
Hello.
On Sun 2002-11-03 at 10:44:43 -0800, [EMAIL PROTECTED] wrote:
> Hello!
>
> I am working on an analysis that is very much dependent on calculating
> time differences in seconds. The most simple example:
>
> I have 3
Hello.
On Sun 2002-11-03 at 10:44:43 -0800, [EMAIL PROTECTED] wrote:
> Hello!
>
> I am working on an analysis that is very much dependent on calculating
> time differences in seconds. The most simple example:
>
> I have 3 variables: time_begin (DATETIME) time_end (DATETIME) and elapsed_
> sec
On Mon, 4 Nov 2002, gerald_clark wrote:
> You can't just subtract datetime fields. Check the date and time
functions
> in the manual.
Thanks,
I should know I run the risk of posting a RTFM/FAQ when I'm tired!
I got off track by misinterpreting "In MySQL Version 3.23, you can use +
and - inste
Jim,
Sunday, November 03, 2002, 8:44:43 PM, you wrote:
JH> I am working on an analysis that is very much dependent on calculating
JH> time differences in seconds. The most simple example:
JH> I have 3 variables: time_begin (DATETIME) time_end (DATETIME) and elapsed_
JH> seconds (INT). The dat
You can't just subtract datetime fields. Check the date and time functions
in the manual.
Jim Hogan wrote:
Hello!
I am working on an analysis that is very much dependent on calculating
time differences in seconds. The most simple example:
I have 3 variables: time_begin (DATETIME) time_end (D
Hello!
I am working on an analysis that is very much dependent on calculating
time differences in seconds. The most simple example:
I have 3 variables: time_begin (DATETIME) time_end (DATETIME) and elapsed_
seconds (INT). The data in these DATETIMES looks fine -MM-DD HH:MM:SS
as expected
Hi,
On Mon, 2002-02-18 at 00:40, [EMAIL PROTECTED] wrote:
> I want to do substraction between tables in mysql,
> MINUS not yet implemented in mysql
>
> and this not work :
> select a.* from table_a a where a in (select * from table_b)
Please post the structure of both tables. T
Hello,
If u can help,
I want to do substraction between tables in mysql,
MINUS not yet implemented in mysql
and this not work :
select a.* from table_a a where a in (select * from table_b)
thanx
-
Before posting, please
19 matches
Mail list logo