select @qty1=@qty+qty from goods2 , result 0 ?

2005-01-06 Thread Shuming Wang
Hi, a table goods2 itemid qty 001 12.5 002100.0 field qty float(10,2) not null default 0 set @qty1=0 select qty, @[EMAIL PROTECTED] allqty from goods2 The result is 12.50 100.0 0 Why not 12.512.5 100.0 112.5 ? It seems @[EMAIL PROTECTED] not work. Best

Re: select @qty1=@qty+qty from goods2 , result 0 ?

2005-01-06 Thread Jeremy Cole
Hi Shuming, select qty, @[EMAIL PROTECTED] allqty from goods2 That should be @qty1:[EMAIL PROTECTED] You are doing a comparison using =, which is returning false (0). Regards, Jeremy -- Jeremy Cole Technical Yahoo - MySQL (Database) Geek -- MySQL General Mailing List For list archives: