Re: ANN: Hopper (stored procedure debugger), version 1.0.1 released

2012-06-22 Thread Martijn Tonies

Hello Jan,



Can you PLEASE note in your listing when a product is Microsloth-only?

While you're at it, can you PLEASE note it prominently on your website? I 
looked through your product description and saw no specific requirements 
beyond what databases were supported. It wasn't until I tried to download 
it that I noticed the warning sign. (.EXE in the file name)


Hard as it is to believe, the entire world does not worship at the alter of 
Bill Gates. We don't allow any Microsloth products on our site.


Although you have a point about the product announcement and lack
of mentioning the required OS on our website, I do find your juvenile
comments about worshipping, changing product names etc just that.

I'll adjust the website and announcements. :)

Have a nice weekend.

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird! 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Need Query Help

2012-06-22 Thread Shawn Green

On 6/22/2012 12:18 AM, Anupam Karmarkar wrote:

Thanks Rick for your reply,

Here i am asking about logic to perpare query or whole query itself.



A set-based approach to doing the basic task is to convert your set of 
start/stop times into duration values. The timediff() function mentioned 
already is a good way to do this.


CREATE TEMPORARY TABLE tmpHours SELECT EmployeeID, timediff(logouttime, 
logintime) as duration FROM sourcetable;


At this point, you have a temporary table of (EmployeeID, duration). It 
becomes very simple to write a summary query:


SELECT employeeid, sum(duration) as totalhours from tmpHours group by 
employeeid;


If you want to breakdown your final report by other values (by date, by 
week, by shift, etc) then you need to compute those and add them to the 
tmpHours table when you create it.


Regards,
--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



RE: Triggers and column names

2012-06-22 Thread Rick James
Suggest using a script to read information_schema and construct the TRIGGER.  
After all, the fields are not going to change from one invocation of the 
trigger to the next, so don't have the dynamic code inside the trigger.

 -Original Message-
 From: Hal?sz S?ndor [mailto:h...@tbbs.net]
 Sent: Thursday, June 21, 2012 5:05 PM
 To: mysql
 Subject: Re: Triggers and column names
 
  2012/06/21 17:06 -0500, Gael Martinez 
 I'm getting that done today thru a large static trigger script and I
 would like something more dynamic...
 
 For that it is needful to look up the table in
 INFORMATION_SCHEMA.COLUMNS, and, yes, you can look up the field names--
 but then what will you do with the character strings that are the field
 names? use PREPARE and EXECUTE for the comparisons, being ware of NULL?
 
 In MySQL help it is written that for its own purposes MySQL actually
 tracks all the information that you crave, but it nowhere is written
 that a BEFORE-UPDATE trigger can make use of it. Maybe UDF, but I know
 naught about that.
 
 Since BEFORE is called on every attempt, successful or not, maybe AFTER
 would be better.
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Triggers and column names

2012-06-22 Thread Gael Martinez
Rick,

That is what I ended up doing, a loop reading the description of the table
in shell :)

Regards
Gael
On Fri, Jun 22, 2012 at 6:54 PM, Rick James rja...@yahoo-inc.com wrote:

 Suggest using a script to read information_schema and construct the
 TRIGGER.  After all, the fields are not going to change from one invocation
 of the trigger to the next, so don't have the dynamic code inside the
 trigger.

  -Original Message-
  From: Hal?sz S?ndor [mailto:h...@tbbs.net]
  Sent: Thursday, June 21, 2012 5:05 PM
  To: mysql
  Subject: Re: Triggers and column names
 
   2012/06/21 17:06 -0500, Gael Martinez 
  I'm getting that done today thru a large static trigger script and I
  would like something more dynamic...
  
  For that it is needful to look up the table in
  INFORMATION_SCHEMA.COLUMNS, and, yes, you can look up the field names--
  but then what will you do with the character strings that are the field
  names? use PREPARE and EXECUTE for the comparisons, being ware of NULL?
 
  In MySQL help it is written that for its own purposes MySQL actually
  tracks all the information that you crave, but it nowhere is written
  that a BEFORE-UPDATE trigger can make use of it. Maybe UDF, but I know
  naught about that.
 
  Since BEFORE is called on every attempt, successful or not, maybe AFTER
  would be better.
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/mysql


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql




-- 
Gaƫl Martinez