SQL: With Rollup

June 9th, 2009 42roads No comments

There have been many cases over the years where I have had to spew out data into some type of output for the user, from Crystal Reports to text files and straight output to a print source. Most of the time, the users wanted multiple data rows and then a summary row to go along with it.

What that usually meant though was that I returned the data to the application and then as I was printing I would do any calculations that needed to be done (Sum / Max / Min / Average) and also have to look for the breaks between groups so I could show subtotals as well. This meant for every aggregate function I wanted to do, I had to have a corresponding Subtotal and Grand Total variable and continuously calculate the variables for each record.

Seems that I have been doing a lot more work than I needed to. With Rollup takes away a lot of the applications need to manipulate the data so that all you really have to do is display the output in the format the user is expecting. With Rollup allows the data to not only have the detail records, but summary records to go with those records.
Read more…

Categories: SQL Tags: , , , ,

SQL - I’ve got a lot to learn

June 9th, 2009 42roads No comments

As a programmer and then later a developer at the job I have, I’ve always been a Jack-of-all-trades. By this, I mean that I really have never been in deep in any one technology. I work for a small company that does custom application development to suit the customers needs, so we adapt to them. In my work, I’ve used VB6 (still do), Crystal Reports (8, 8.5, 10, 11), Visual Basic.Net, C#, SQL, LLBLGen, etc, etc. On top of those responsibilities I also help with the Network and I run the phone system here.

After all these years though, I’ve always been drawn to one thing here at work, SQL Server. I love designing databases and writing stored procedures. So, I’ve decided to push deeper into MSSQL learn everything I possibly, big or small, to help me be better at what I do. Thankfully, I’ve been pushed more into the database world lately, so now is the perfect opportunity to expand my SQL knowledge.

Basically, I’m stating this because I am going to start blogging about things I learn SQL-wise along the way, no matter how small. I know it will be helpful to me but hopefully, I’ll be a help to someone else along the way as well.

Categories: SQL Tags:

The Realm

May 18th, 2009 42roads No comments

Was looking up an article on Cisco Network Security and stumbled on their nifty little web series: The Realm.

Categories: Hardware Tags: ,

New Computer

May 15th, 2009 42roads No comments

Since I’m going to be studying for my SQL Exams (70-431 or 70-432, 70-433 and 70-448), I needed a new computer to run all the software I need to study (as well as for a little bit of gaming). My old PC was purchased from Wal-Mart about 5 years ago, so it definitely has seen better days. I set up a computer on NewEgg and was actually shocked at the amount of power you can get for relatively cheap. Here’s the specs on my new computer:

Motherboard GIGABYTE GA-EP43-UD3L LGA 775 Intel P43 ATX Intel Motherboard
CPU Intel Core 2 Duo E7400 Wolfdale 2.8GHz LGA 775 65W Dual-Core Processor Model BX80571E7400
Memory CORSAIR 4GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR2 1066 (PC2 8500) Dual Channel Kit Desktop Memory
Hard Drive Western Digital Caviar Black WD5001AALS 500GB 7200 RPM 32MB Cache SATA 3.0Gb/s 3.5″ Internal Hard Drive
Video XFX GS250XYDFU GeForce GTS 250 512MB 256-bit GDDR3 PCI Express 2.0 x16 HDCP Ready Video Card
DVD Drive SAMSUNG Black DVD Burner with LightScribe
Power OCZ Fatal1ty OCZ550FTY 550W ATX12V / EPS12V SLI Ready CrossFire Ready Modular Active PFC Power Supply
Case GIGABYTE GZ-X3BPD-500 Black 0.6mm SECC Steel ATX Mid Tower Computer Case

After putting the computer together and making sure that everything was working, I loaded Windows XP Media Center on it. It took about a week to get all the software I needed on it and to get it configured the way I wanted. It was a huge improvement over my old PC. However, I was a little disappointed that XP Media Center wasn’t using all 4 gigs of RAM due to it being 32-bit.

The Lord works in mysterious ways. I attended the PDANUG and at the end they gave out some door prizes. The prize that I won just happened to be exactly what I needed: Windows Vista Ultimate, 32-bit AND 64-bit. So I’ve got my PC loaded with it now, running like a dream on all 4 Gb of RAM!

Categories: Hardware, Misc Tags: , , ,

Development Blog

May 14th, 2009 42roads No comments

This is now strictly a development blog, focusing on Microsoft SQL Server. My personal blog has moved to 42 Roads to Walk.