Copying rows from one table to another in MSSQL

To copy specific rows from one table to another in MSSQL you will want to run something like:

insert into destinationtable select * from sourcetable where column = ”
So for example, if you wanted to restored rows from your sourcetable where userid has DOMAIN.COM in it, your query would look like:
insert into destinationtable select * from sourcetable where userid like ‘%DOMAIN.COM’

Creating table from another table in MSSQL

In MSSQL, you sometimes want to backup your table(s) before you do something, so in the event you need to roll back, you don’t need to restore the entire database, you can just copy in the data from the newly created table, and dropping the data in your existing table. 

To do this, you would simply run:
select * into newtablename from existingtablename

As most of you will remember, the first cut of the Punisher aired back in 2004, and while it was an interesting movie, I think most would say it didn’t live up to the spirit of the Punisher. 

We have seen over the past few years a revolution in the comic and Hollywood worlds, as they have collided on various projects. We saw successes in the original Spiderman, but in the two sequels, I think most would generally say those were not so good, with Spiderman 3 being a major flop. The same goes with the X-men trilogy, with the first one laying good groundwork for future work, and the other 2 movies being a general let down, with X-men 3 being a HUGE failure! 
But as with most revolutions, you see change occuring, and in this case, we first saw the Marvel world come together and pull itself out of the wreakage stronger and more fit than ever. For years they have complained about everything from loss of directorial impact, cast, marketing, film direction, story line, etc, the list goes on, and to this, they pulled together and formed Marvel Studios and released two enourmously popular blockbuster films, Iron Man and the remake of the Incredible Hulk.
While I’m not a comic book reader of the past, I do have to admit, I completely enjoy watching these films, as it sparks the inner child in each of us to look at the future and science fiction and stretch our imaginations to the possibilities without going into the realm of ultra-fantastic. Last Friday on opening day, Marvel and I went to the first screening of the new Punisher: War Zone movie, and I have to admit, right off the bat I was very impressed. The movie was far more realistic and gore-filled than I had originally thought it would be, and the story was tight and to the point. For the entire movie I found myself drawn to the characters and closely glued to the screen in anticipation of what was coming next. Needless to say, DC hit one out of the park, and I know from my vantage point, I’ll be looking to the next release of the Punisher, as the movie left it wide open for a sequel. 

RuffWear Bark’n Boots Grip Trex Review

So Momo got his Christmas present early–it came in the form of RuffWear Bark’n Boots Grip Trex booties for him. You can view the company information from this URL

Many may ask, why it is that we would invest what we would consider a lot of money into getting foot accessories for our dog. Here are a few requirements that we have that drove our decision to make this investment. 
  1. During various times of the year (mainly end of Summer early Fall), we notice that Momo will start to chew on his feet, leaving them bear and sometimes to the point where he breaks the skin as you can see little scabs on his paws. We believe that this is probably due to some chemical irritant that he walks through, perhaps those inconsiderate folks in the neighborhood who decide green lawns are a more worthy cause than consideration for our 4 legged friends. We’ve asked our neighbors and HOA to post signs whenever their lawns are treated with anything, but we have found that folks take this to little or no consideration. 
  2. During the winter time, especially when the weather gets really cold, Momo will start to walk like his paws are freezing to the ice or concrete, as you see him trying to walk with one paw raised, than after hobbling along will try and raise another paw. In the past I’ve had dogs who just lie on their back with all their paws in the air as its more comfortable than walking on the sub-zero temperatures beneath them. I think as humans, we forget that we invest quite a bit of money into technology that is put between our natures barrier (skin) and the elements–whether that be in the form of boots with hi-tech synthetics and tech to keep our feet warm and dry, or jackets of equal technological marval!
  3. When Momo comes inside, his first act is usually to lick his paws clean–and god knows what he picks up as he’s walking along!
  4. When it rains, we have a wet dog walking through the house leaving his paw prints on everything. Generally in addition to the dampness, there is also mud as naturally he walks through that as well as he tries to do a number 1 or number 2 (or both if nature prevails!). 
  5. No matter what it seems that we put on his feet, his feet must be a delicate part of him as he doesn’t like anything on them! He tries and usually succeeds in kicking off whatever we put on his feet, through vigorous shaking and biting at whatever is on his feet.

So given these requirements, we have been scouring high and low for something to address all of these requirements. We’ve tried a few products with limited success, but nothing that really has had long term possibilities. That is until we heading in to our local REI store in search for a parka for me actually, and found they had quite a large pets selection in the store (score!). We found these and the first thing we noticed was how the velcro fastener made a very tight fit possible–this was important to address the issue of him kicking off the boots after we put them on. 
Next we noticed that the soles were made by Vibram, and my wife is absolutely taken to town with this as she looks for this on practically all her shoes from now on as she’s convinced of their superior fit and comfort (Merrell shoes is one that she’s particularly fond of at the minute).
Aside from the above, we saw that the construction was very well done, and when his paws are in them gives a lot of room for movement. The box that they came in with also lists the following which are not on the website:
  • Built on an anatomical mold like human shoes for consistent fit, sizing, and shape
  • Air mesh upper is comfortable, breathable, durable, and drainable for all-season wear
  • Grip cuff hugs the leg, stays in place, and improves comfort
  • Expansion gusset makes the boots easy to put on and enhances fit
  • Sure Cinch closure strap and lash tab ensure that the boots stay on the paws
  • Seamless construction reduces abrasion and improves fit
  • Reflective trib adds safety and nighttime visibility
  • Vibram high-grip, high-traction, high-performance sole
  • Omnidirectional X lug for stability and traction
  • Nonmarking sole for nautical and home interior uses
  • Extradurable for miles and miles of adventure

After we made this purchase and got home, we fitted Momo with these, and decided to take him on an extended walk. Now it has been snowing here in Chicago for the last week, and while there isn’t a lot of buildup, there is some snow on the ground and more importantly ice that is beneath it. Now Momo doesn’t like ice at all–he actually avoids it at all costs if he can, and I imagine this is because he feels unsure of his footing and the tendency to slip is a lot more prevalent. He faught for the first few minutes, and take it from folk who have tried a number of various products, this is normal. You just have to get the dog walking to keep his mind focused on something other than what’s on his feet. After the first few minutes, he started to act normally and the walk was on. We immediately noticed that it seemed like he had a lot better traction, as he didn’t slip once on the ice and he didn’t seem to be phased by ice or snow. He was able to make his usual movements, including the stances for number 1 and number 2 activities. He was playful in the snow and energentic, and it certainly seemed like the boots were able to move with him and did not cause discomfort moving from stance to stance. He was walking as well as running, activities that we would not have expected from previous products we have tried.
The proof was in the pudding when we got him home and did the paw test, and sure enough they were dry to the touch even though the boots themselves had bits of caked on snow that had turned into ice and were very wet. All in all I’d say this was $60 well worth it and I would recommend this to any dog owner who has/is going through similar types of things as I’ve listed above. Feel free to comment on your experiences success or failures as I’d be interested in what others have noticed about this product.

Purchasing Siege weapons in Warhammer Online

So in my pursuit of playing Warhammer Online, there is a feature for Keep sieges that I have been trying to get information on how you go about purchasing siege weapons. These include things like battering rams as well as defensive tools, such as hot oil. Most people say “You can purchase this at an NPC”, but I’ve been having a heck of a time figuring out which NPC sells it. Well here you go, in the town that you are in, typically this is the town that is closest to the keep, you will find an NPC with the label: Quartermaster. From that NPC, you can purchase the necessary siege devices and go to war with the other realm!

Installing Process Maker on Ubuntu 8.04

This is being installed on a vanilla VM image with LAMP and OpenSSH server installed. The first thing you will want to do is:

sudo apt-get update
sudo apt-get upgrade
This will ensure that your base system is fully updated before we get started. If you didn’t install LAMP or OpenSSH, you can run:
sudo apt-get install openssh-server mysql-server php5 apache2 php5-mysql
and this will install the software you need. Let’s start by getting the software. Go to the URL:
and copy the link to pmos-1.1-1999.tar.gz. You run the following:
cd /opt; sudo wget http://downloads.sourceforge.net/processmaker/pmos-1.1-1999.tar.gz?modtime=1225133280&big_mirror=0

Your URL at the end of the wget may be different depending on the version of the package and the mirror site that SourceForge provides you. Run the following:
sudo tar zxvf pmos-1.1-199.tar.gz
so that the files extract in the /opt mount, you should see that this extracts a directory: processmaker. After this has completed, you will run:
sudo a2enmod expires
sudo a2enmod rewrite
sudo /etc/init.d/apache2 force-reload

and because we are going to use Joe:

sudo apt-get install joe

Now we need to configure apache2 to read from the configuration files. To do this, you will run:

sudo cp /opt/processmaker/etc/pmos.conf /etc/apache2/sites-available/
sudo joe /etc/apache2/sites-available/pmos.conf
sudo a2ensite pmos.conf

and add in the following line to the pmos.conf file:

php_value magic_quotes_gpc 0

once these have been added, reload apache2:

sudo /etc/init.d/apache2 reload

Now we need to create a superuser on the MySQL database. This is done by running:

mysql -p
mysql> grant all on *.* to ‘USER@localhost’ identified by ‘PASSWORD’ with grant option;

Change the USER to the name of the new user, and PASSWORD to the new password.

cd /opt/processmaker
sudo mkdir shared compiled
sudo chmod 777 shared compiled
sudo chmod 777 -R workflow/engine/content/languages
sudo chmod 777 -R workflow/engine/js/labels
sudo chmod 0777 -R workflow/engine/config/
sudo chown www-data:www-data -R /opt/processmaker

Finally you will want to open the site in a browser:

http://servername:port/

You may need to disable the default site in apache2, you can do this by running:

sudo a2dissite default
sudo /etc/init.d/apache2 reload

The installation configuration page should appear and test your configuration. You should expect that MySQL fails, until you enter in the username/password that you created previously in this guide. You can click on the TEST button to verify that it’s configured properly. Also you will get a warning that the memory_limit for PHP is too low. By default PHP will install with the memory_limit = 16M. To change this run:

sudo joe /etc/php5/apache2/php.ini

and change the 16M to 40M. Once this is done you have to reload apache2 for the changes to take effect. Once this is done you should have green across the board, and be ready to move forward with the install. If everything installed properly, you should get to a login screen, at which point you will enter using the default login information of:

Username: admin
Password: admin

Obviously once you login, you’ll want to change this information to something more secure. That should be, it, if you’ve followed everything here, the software should be installed and ready for you to go to work and play with it! The below URL will get you started on configurations. This is my first time using this software, so I’ll write up a post regarding configuration and integration with other systems after I get to that juncture in my process.

Note, if you are logging in from another machine, you might get a 3rd option during the login asking for workspace. By default, the default workspace is: workflow. 

Installing MindTouch DekiWiki on Ubuntu 8.04

I installed mine on a clean 8.04 VM image, so your environment may be slightly different, but going back to a vanilla install, this guide should be completely accurate. 

The first thing you will want to do is make sure that LAMP is installed on your machine and configured. You will also need to make sure you know the password to the ‘root’ user for MySQL. The next thing you need to do is:
sudo apt-get update
sudo apt-get upgrade
This will make sure your system is up2date with the existing software before you go ahead and update it further with Dekiwiki. Next you will want to run:
sudo apt-get install joe
As most of you know by know, joe is one of my favorite text editors on Linux, so the rest of the guide will use joe. Next run the following:
sudo apt-get joe /etc/apt/sources.list

and add in the following:
deb http://repo.mindtouch.com xUbuntu_8.04/
Once you save the file, run:
sudo apt-get update
Next run:
apt-get install html2ps poppler-utils html2text wv gs tidy links msttcorefonts cabextract
You want to respond ‘YES’ to everything that you get prompted for. Next you will want to run:
sudo wget http://www.princexml.com/download/prince_6.0r6-1_i386.deb
sudo dpkg -i prince_6.0r6-1_i386.deb
sudo apt-get install dekiwiki
and finally you will run:
a2ensite dekiwiki
a2dissite default
sudo /etc/init.d/apache2 reload
Then once Apache reloads you can go to the URL:
http://<servername>: /config/index.php
and go through the form to enter in information such as the title of the dekiwiki instance, administrator username/password, and database connection information. Once that gets configured you should get to a success page where you will then run some commands to clean up your installer.
Reference

How to fix the automotive industry?

As most American’s and the world for that matter know, the automotive industry here in America is not doing so well. GM, Ford, and Chrysler are all pleading with the federal government to afford them $25 billion in tax payer monies from the $700 billion dollar bailout, to help them through their hard financial times.

Really I do empathize with them, companies now are looking at hard time whether its services and goods that are consumer driven, or if your consumers are governments like it is with my company, we are all feeling the pinch. But most companies don’t have the luxary to look to someone like the US government for assistance to help coderize the bleeding that is occurring within their business. Business sure up their practices by looking inward for things like MUDA (Japanese for waste) improvements, process, documentation, training or they look at reductions such as travel, operating costs, and the dreaded head count. Surely there are a variety of ways, more than are even listed here, for a business to look at improving itself to be able to weather through these hard times.

But when we look at companies like the big three, take GM for instance, they are a multi-national conglomerant with many different brands. For instance GM’s active brands include:

  • Buick
  • Cadillac
  • Chevrolet
  • Daewoo
  • GMC
  • Holden
  • Hummer
  • Opel
  • Pontiac
  • Saab
  • Saturn
  • Vauxhall

If I was in a position to look at ways to limit my exposure, here are a list of things that I would start to do. First off, the Hummer brand to consumers needs to end immediately. Given the cost and ecological footprint, its just not a brand that should weather through these economic times. All consumer locations should be closed and another brand, such as GMC should take over the servicing of existing Hummers that are out there.

Second, I would look for ways to synergize my line of vehicles. SUV’s in all the lines should be looked at and reduced. Start eliminating diversity and consolidate into a core line of products that can be retooled and made better. If you look at the GMC line for instance, there are 4 SUV’s that are currently active–and that’s just one GM company. Buick and Saturn both also have SUV’s. These aren’t selling, so if they aren’t hybrid or have a positive value in the marketplace, stop making them and stop selling them immediately. There are a lot of high cost lines within GM:

  • Cadillac
  • Saab
  • Buick

Get rid of one of the brands and consolidate. Or reduce the overall line to focus in on core values.

Also if I was CEO of GM, instead of asking Congress for a crapload of cash, I’d go to them with a proposal to help stimulate the economy, that is provide economical, fuel efficient vehicles and have the government subsedize them to the consumers. I.e. make a car that costs less than 10k, will last at least 5 years, and has a MPG higher than 50. Ask Congress for monies to develop this type of vehicle, retool, and backend into some sort of tax credit for folks who purchase these types of vehicles. This is the car of the future, where you get a lot but less emphasis is put on the fashion trendy aspects of what we’ve come to expect of a vehicle.

Stock Market, Who’s to Blame?

I wanted to wait until things cooled down a bit and hope that the folks on Wall street starting taking a real look at what ails the country and to starting looking forward at the bigger picture instead of what lines their wallets.

But what do I find, there isn’t any motivation there (at least it seems) to get things done. Is the problem average every day working American’s? I don’t think so. The issue here lies with the folks who control banks and big business.

When American’s starting loosing their mortgage and finding it hard to get money to pay for things, what did government do to help us–practically nothing. In the 2007 State of the Economy address:

http://www.whitehouse.gov/news/releases/2007/01/20070131-1.html

One quote that seems to be in conflict:

On Wall Street, you know that America’s economic leadership rests on strong and flexible capital markets. Capital markets connect entrepreneurs with the investment they need to turn their ideas into new businesses. America’s capital markets are the deepest, the broadest, and the most efficient in the world. Yet excessive litigation and over-regulation threaten to make our financial markets less attractive to investors, especially in the face of rising competition from capital markets abroad. To keep America’s economic leadership, America must be the best place in the world to invest capital and to do business.

It is this reliance on Wall street to do the right thing, to strengthen our economy, to invest our and their monies wisely, to work in the best interest of the country and not the best interest of the bottom line. This is one of the fundamental issues with capitalism, that the wealth is amassed by those who are most able to do so, not necessarily those who are most deserving. One comment that Bush made: “..excessive litigation and over-regulation threaten to make our financial markets less attractive..”, really goes to support this idea that I think most American’s can support and that is the Bush administration has done one of the worst jobs in keeping our markets healthy and fit. Are we trying to attract new investors? You know what, if the new investors come in the form of China, I will pass on this. I think what’s best for America isn’t to rely on foreign countries to invest the most into this country, but that we take the initiative to invest in ourselves, and others then see this as a mark of our health and stability and then they see a value in investing.

We don’t need to change the law. We need to change the way the law is implemented. America needs a regulatory environment that promotes high standards of integrity in our capital markets, and encourages growth and innovation. And I’m pleased of the progress that Hank Paulson and Chairman Chris Cox are making to make sure the regulatory burden is not oppressive, and fair, and helps us meet a great national objective to keep the United States the economic leader in the world.

In retrospect, can we honestly say that this is actually what the Bush administration has promoted? Has the American regulatory environment been held to the highest standards, or is this environment that was created promote high standards for those who follow them, and those that don’t just fall through the cracks? And has Paulson and Cox really done the right things with managing the regulatory burden? Who’s not oppressive and fair and helping to make the United States an economic leader in the world? I think if anything we have become an economic burden that is having knock on effects with the various other economies of the world.

We must ensure that the money you send to Washington is spent wisely. Next Monday, I’m going to submit to Congress a budget that will eliminate the deficit by 2012. In order to do so, we need to set priorities in Washington. You can’t try to be all things to all people when it comes to spending your money if you want to keep taxes low, keep the economy growing, and balance the budget. And my number one priority is to protect this country. And we’re going to make sure our troops have all the equipment they need to do the job we’ve sent them to do — (applause) — and make sure our citizens have what it takes to defend this homeland.

So with a national deficit of: 10 trillion dollars is Washington spending our money wisely? I think the answer to this is fairly clear that they are not. And this is a huge problem. It’s comparable to the careers that we see throughout our working lives. You start out with nothing (typically), so your income is low, but your debt is also low. As you continue to work you get promotions and raises, and you think to yourself, wow, I just pasted the 50k mark, or the 75k mark, or the 100k mark, and you think to yourself what a great job this is–but on the flip side, you see that your debt is rising at an almost even rate, so in the end you really don’t have very much gains. The same goes with the American economy–just cause we are making more money, if we don’t stop the gushing spending that is occurring, we are at no better place than where we started. Granted the government can actually print money, but that’s not a license to just spend.

So between the policies of this failed administration to the failings of Wall street to react to the good news and to stop looking for the point where you get the fatest return, we won’t be in any better place than where we currently are. And this my friends is what I’m really sad about. It comes as the pain of the many on the BMW’s of the few who actually profited from this whole ordeal–either those before the economy fell on its head, or those who are waiting out for a better tomorrow and to cash in.

Installing Geany Ubuntu

I’ve been reading through the book Agile Web Development with Rails by Dave Thomas and David Heinemeier Hansson, and there is a review of various editor’s, such as:

  • TextMate
  • RadRails
  • jEdit
  • Komodo
  • Arachno Ruby

While this opinion may change down the road, just starting out, I found it incredibly hard to find an editor that works. Textmate works on Mac, so that’s out of the picture. RadRails seems to have a long and exhaustive install process–no thanks! Jedit, I couldn’t get to work at all!

So after a bit more Googling I came across Geany. Now things might change later on, after I get to use this more, but for now it’s working. Hopefully this is the first blog of many on my travels in Ruby on Rails development!

Get Adobe Flash playerPlugin by wpburn.com wordpress themes