Saturday, November 20, 2010

SQL Query vs Microsoft Access Query

There are subtle differences in the way that you write queries depending on if you use SQL Server or Microsoft Access to write your query.  One difference is that Microsoft Access uses the pound(#) sign for a date and SQL Server uses an apostrophe(') for a date. 

SQL Server Example:  WHERE Date_Found BETWEEN '11/1/2010' and '11/20/2010'
Microsoft Access Example:  WHERE Date_Found BETWEEN #11/1/2010# and #11/20/2010#

Another difference is with the LIKE command.  When you use the LIKE command with SQL Server, you would use the percent(%) sign.  With Microsoft Access, you would use the asterick(*).

SQL Server Example:  WHERE Example LIKE '%this%'
Microsoft Access Example:  WHERE Example LIKE "*this*"

As you can see, Microsoft Access utilizes quotes(") for strings and SQL Server utilizes apostrophes(') for strings.  These differences can cause errors, and even though you may think you are writing the correct query, you are actually not.

Friday, November 19, 2010

Powering off a stuck computer

If you have ever experienced a time when your computer has frozen and nothing can be done with the keyboard or the mouse.  Well, some people unplug the computer, but there is a simpler way to shut down the computer.  All you have to do is hold down the power button until the computer shuts down itself.  I wouldn't recommend doing that unless it was your last option.  I say this because you have no chance to save anything that you have been working on.  Plus, don't power off your machine if the computer is doing something for you (the hard drive light is flashing).  But if the computer is frozen, it should be fine.

This is a simple tip that I will start with after being back from my blog vacation.

I am back

I know it has been a while since I have posted something on this blog.  I have been on a blog vacation but now I am back to write more about the things that I like, computers and programming.

I will try and write more frequently so there are more tips and advice for computers and the computer industry.  The industry changes so often that there are endless things to discuss.