Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 6

Displaying posts with tag: Case (reset)

Using conditional expressions inside MySQL Stored Procedure
+1 Vote Up -1Vote Down
Sometimes there is need to use conditional expression inside stored procedure to control the flow of execution.
We can use IF or CASE statements for this.


Below is a stored procedure to check the performance of a student based on its score.
Store the below stored procedure in a file called get_performance.sql

DELIMITER $$

DROP PROCEDURE IF EXISTS get_performance$$

CREATE PROCEDURE get_performance
    (score NUMERIC(8, 2),
    OUT result VARCHAR(11))

BEGIN














  [Read more...]
After 10 Years, MySQL Still the Right Choice for ScienceLogic's "Best Network Monitoring System on the Planet"
Employee_Team +1 Vote Up -0Vote Down
ScienceLogic has a pretty fantastic network monitoring appliance.  So good in fact that InfoWorld gave it their "2013 Best Network Monitoring System on the Planet" award.  Inside their "ultraflexible, ultrascalable, carrier-grade" enterprise appliance, ScienceLogic relies on MySQL and has since their start in 2003.  Check out some of the things they've been able to do with MySQL and their reasons for continuing to use MySQL in these highlights from our new MySQL ScienceLogic case study (http://www.mysql.com/why-mysql/case-studies/mysql-best-for-sciencelogic.html).
  • Science Logic's larger customers use their appliance to monitor and manage  20,000+ devices, each of which generates a steady stream of data and

  [Read more...]
Case Study: Waiting Room Solutions Relies on MySQL for Web-Based Medical Management Systems
Employee_Team +2 Vote Up -0Vote Down

Waiting Room Solutions (WRS) is an award-winning web-based Electronic Medical Records (EMR) and Practice Management System for physicians’ offices. Based in Goshen, NY, WRS serves almost 3,000 users for their needs in charting, medical record filing, payment tracking, prescription and reporting via the SaaS (Software as a Service) model, and WRS has sent over 20,000 electronic prescriptions a month over its secure network.

The Business Challenge

WRS was looking for a robust database for enterprise-class web-based applications with the following features:

1. Security

Medical records and health information are highly confidential, and WRS expected to be fully incompliance with privacy regulations such as the HIPAA Privacy Rule.

2. Data Integrity

It is important to minimize data

  [Read more...]
Building The Perfect HTPC (Media PC), Capable Of Playing 1080P H264
+0 Vote Up -0Vote Down

The Idea.

For the past month I have been exploring options and building a perfect Home Theater PC for my 50” Vizio plasma. Besides the obvious, it has to play movies, youtube videos, etc, I had a few concrete goals in mind. Here they are:

  • it absolutely had to handle 1080P h264, specifically movies encoded using x264. An average movie size for this format is between 8.5 and 13 GB. There were 2 problems to overcome: the CPU had to be able to handle the decoding (my desktop dual core Conroe barely kept up) and the network had to be fast enough to stream in real time from my storage PC a floor away.
  • I needed to have the easiest control over the whole thing. VNC wasn’t good enough, because I don’t always have a laptop lying around.
  • It had to support 7.1 sound.
  • It had to have excellent picture quality
  [Read more...]
MySQL Stored Procedures: CASE syntax
+0 Vote Up -0Vote Down
Thank you all for taking the time to respond to the little challenge I posted yesterday! I am pleasantly surprised to note that so many people took the time to post a solution. And most people provided the correct answer too: you are all entitled to a well deserved discount to register for the MySQL User's conference!!!

For those of you interested in the solution: there are two different forms of the CASE statement syntax: the so-called simple case and the searched case.

The simple case selects one WHEN...THEN branch by comparing the value



  [Read more...]
MySQL stored procedurs: ...the CASE that they gave me...
+0 Vote Up -0Vote Down
Let's see if you can solve this little puzzle...

Consider this stored procedure:

-- finds the first slash and exits
create procedure p_find_slash(p_text text)
begin
declare v_index int default 1;
declare v_length int default character_length(p_text);
declare v_char char(1);

_main_loop: while v_index -- loop over all characters

set v_char := substring(p_text, v_index, 1); -- grab the current character
case v_char
when v_char = '/' then -- found a slash!
select concat('A slash at ', v_index) message; -- report it
leave _main_loop; -- and then stop


















  [Read more...]
Showing entries 1 to 6

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.