Monday, January 30, 2012

UPDATE with JOIN

If you need to update data of a table (DestinationTable) with data of another table (SourceTable) there are 3 ways you can get this done in SQL.

Method 1

This is the most common and simple way with using a sub query.





  1. UPDATE DestinationTable SET DestinationColumn =
  2.     (SELECT ValueColumn FROM SourceTable WHERE DestinationTable.MappingColumn = SourceTable.MappingColumn)




 

Method 2

This users the most common FROM clause to join the two tables as shown below.





  1. UPDATE DestinationTable SET DestinationColumn = SourceTable.ValueColumn
  2. FROM SourceTable
  3. WHERE DestinationTable.MappingColumn = SourceTable.MappingColumn




 

Method 3

Last method mentioned below uses the join clause to join both the tables to make the update happen properly.





  1. UPDATE DestinationTable SET DestinationColumn = SourceTable.ValueColumn
  2. FROM DestinationTable
  3. INNER JOIN SourceTable ON DestinationTable.MappingColumn = SourceTable.MappingColumn




 

Hope these helps.

Friday, January 27, 2012

Naracoorte Caves – Naracoorte South Australia

If you are a cave lover, there are many places Australia has to offer. Out of them one of the best is Naracoorte caves in South Australia. Inside the caves you will be able to see lime stones which took about 200 million years to form.

Stalactites – Are the ones hanging from above. Because they form from water dripping from above they tend to get points on them.

 20120127_17075020120127_170817

Stalagmites – Are formed on floor and start growing up with time.clip_image00220120127_16453020120127_164536

Columns – Are formed by one stalactite and stalagmite connecting after so many years.

 20120127_16574520120127_16425520120127_165836

It is good idea to plan and visit the caves bit early since you need time to have a look into the caves. They normally close at 5PM and the last tour starts around 4PM.

There is a visitor information centre in the Wonambi Fossil Centre so you can find out the interesting places in Naracoorte Caves National Park. Wet cave is a free attraction. When you purchase a ticket for a tour to visit Alexandra cave you will get free admittance to the Fossil enter and the miniature man made zoo.

Pram accessibility is not there when visiting caves, also you need to take care of your young children because they might need lot of assistance from you when inside the caves. Also supervise your children frequently since some of the Stalactites and Stalagmites are fragile and if they break one then thy may be destroying millions of years of natures’ work.

Car parking is free and plenty of sitting areas are there. Toilet facilities are there also is a restaurant so you can buy food if you need.

Address : Naracoorte Caves National Park, PO Box 134, Naracoorte SA 5271.

Phone : (+61 8) 8762 2340

EMail : naracoortecaves@sa.gov.au

Web : http://www.environment.sa.gov.au/naracoorte/Home

Map


View Larger Map

Wednesday, January 04, 2012

Deep Creek Conservation Park, South Australia

If you would love to enjoy scenery and wild life, a place you should definitely visit is Deep Creek conservation park in South Australia. It is located at the southern tip of the Fleurieu Peninsula.

It is always better to have a 4WD or an AWD but with a 2WD also in good weather you will be able to do most of the tracks without any major problems.


Map



View Larger Map