Tag Archive | "MySQL"

MySQL and SQL Server - Oracle CONNECT BY PRIOR for Recursive, Hierarchical Data

Recursive queries are something I have used many, many times over the years to build dynamic, n-tiered hierarchies. Oracle’s CONNECT BY PRIOR is awesome.

Does anyone know if this is possible in SQL Server or MySQL?

From what I understand, stored procedures would need to be used in MySQL and SQL Server to accomplish what Oracle does in one SQL statement with CONNECT BY PRIOR. I need to dig into the other databases a bit further to verify, but I am interested in any elegant solutions people have come up with if you would like to share.

Convert INT to BOOLEAN in a SQL SELECT for Multi-Tiered Sorting

We have a family tree. Some people have children, while others do not. We want to sort results by alphabetically listing individuals with children in an initial group, and then those without children in a second group — also alphabetically. Let’s assume there is not an isParent column (nor the equivalent) on the table, but there is a way to determine how many children each individual has.

Read Convert INT to BOOLEAN in a SQL SELECT for Multi-Tiered Sorting...

Data Validation and Cleansing - Technology, a New “Mouse Trap”

You lie in wait, looking for your prey, it approaches, and looks around. You spring the trap and
find the spoils of war…the dreaded %20

Ok, maybe not all that exciting, but it brings up an important problem in data conversion and in
application development projects. Namely the importance of input data trapping and input
validation.

Read Data Validation and Cleansing - Technology, a New “Mouse Trap”...

Staging Data with MySQL, CSVed, and XAMPP

No Comments »
Filed Under Technical Tips // Tags:

The Task: Take and load, using MySQL, a flatfile of over 450 colums and over 145,000 rows of data and put it into a staging table.

The Conditions: The data may not be altered prior to the staging load, or in the staging load. Only when the data is loaded from staging to the final tables may it be altered.

Read Staging Data with MySQL, CSVed, and XAMPP...


Archives

Recent Comments

  • SaintClair said: Thanks a million for this priceless material. May God richly bless you!
  • ashok.aggarwal said: Thank you for your comment, Stuart. I’m glad this helped you.
  • Stuart said: I’d really like to thank you for your post. It was really that simple.
  • ashok.aggarwal said: Your specific question is not very clear, however, in the context of implementing a LIKE...
  • Jonas said: Finally in print that a user is required to show the email option. Thanks.

Calendar

March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  

Featured Testimonial

"M&S has taken 'partnership' to a new level. They are not only a deeply skilled service provider, the M&S team is actually a mission critical component to our operations, taking on new initiatives as well as maintaining custom, open source, and COTS solutions."

CEO, MedPivot

Free SQL Service