<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-17795373</id><updated>2011-11-28T08:46:17.002+08:00</updated><category term='cardiac arrest'/><category term='PayPal Discount Coupon'/><category term='marathon'/><category term='Extinction'/><category term='Freedom'/><category term='Papercut'/><category term='mid valley'/><category term='Cancer'/><category term='Cool'/><category term='Iconic Building'/><category term='marry you'/><category term='Article'/><category term='care'/><category term='Horse'/><category term='Free Streaming'/><category term='Cash Back'/><category term='Paintings'/><category term='Patric Chan'/><category term='Watch'/><category term='eBay.ca'/><category term='pjlighthouse.com'/><category term='matte painting'/><category term='Drummer Girl'/><category term='Lady Gaga'/><category term='Taio Cruz'/><category term='google SEO'/><category term='wacko jacko'/><category term='search enghttp://www.blogger.com/img/blank.gifine optimization'/><category term='Scanner'/><category term='Kuala Lumpur'/><category term='Raphael Lacoste'/><category term='Sylvester Stallone'/><category term='Query'/><category term='HotWheels'/><category term='rice'/><category term='Playstation 9'/><category term='Girl'/><category term='Nature'/><category term='Drop Down list'/><category term='Influenza'/><category term='Joe  Cocker'/><category term='ecx'/><category term='baby  Harper'/><category term='michael jackson'/><category term='NBC'/><category term='BrilliantOrigami'/><category term='haha'/><category term='Love Story'/><category term='Niche'/><category term='Tips'/><category term='LyricsBecause'/><category term='COLD WATER'/><category term='Official Batman'/><category term='SEO Mythology'/><category term='Life'/><category term='Terry Fox Run'/><category term='Sculptures'/><category term='Health Hazard'/><category term='2.0'/><category term='facts'/><category term='Amazing'/><category term='pain'/><category term='K-Ci'/><category term='Sony Computer Entertainment'/><category term='Child care'/><category term='The Kindness of Strangers'/><category term='Full Official'/><category term='Matt Torrens'/><category term='Bull Driftwood'/><category term='Marathon of Hope'/><category term='Maximum Revenue'/><category term='The Force'/><category term='moving'/><category term='AI Map'/><category term='LIVE'/><category term='Make Money Online'/><category term='Self Development'/><category term='8tv showdown'/><category term='World of Warcraft'/><category term='KL 07'/><category term='ebay'/><category term='Season 02'/><category term='The Dark Knight Rises'/><category term='Photos'/><category term='music bruno mars'/><category term='Panda'/><category term='godaddy.com sucks'/><category term='gadget'/><category term='event'/><category term='SBREADVERAGE'/><category term='Weird'/><category term='Allstars'/><category term='Movie Trailer'/><category term='inspiration'/><category term='Hayden Panettiere'/><category term='hope'/><category term='sql tips'/><category term='Danicar'/><category term='v6.64'/><category term='Kylie Minogue'/><category term='animation'/><category term='Calculating'/><category term='VapoRub'/><category term='By Matt Foster'/><category term='canada'/><category term='Facebook'/><category term='Health'/><category term='Japanese'/><category term='marry you lyrics'/><category term='Shanghai'/><category term='Brian Dettmer'/><category term='Entrepreneurism'/><category term='PS9'/><category term='Shoes'/><category term='Harper seven Beckham'/><category term='vs'/><category term='Potential Company Mergers'/><category term='godaddy suck'/><category term='Enthusiasm'/><category term='Dionne Warwick'/><category term='MTV'/><category term='knee'/><category term='Mark Douglas'/><category term='Create'/><category term='Petaling Jaya'/><category term='japanese rice art'/><category term='Little Baby Sculptures'/><category term='music'/><category term='laugh'/><category term='MS SQL'/><category term='Movie Trailer 2012'/><category term='Human'/><category term='Terry Fox'/><category term='Cool Bear'/><category term='Google'/><category term='Shaggy'/><category term='Folding Paper'/><category term='Dina'/><category term='online business'/><category term='paypal'/><category term='Warcraft III'/><category term='Database'/><category term='Free Download'/><category term='Promo Codes'/><category term='Star Wars'/><category term='muisc'/><category term='Expert Tips'/><category term='John Rambo'/><category term='Lyrics'/><category term='CR-Z'/><category term='HEALTH RISKS'/><category term='Trailer'/><category term='Concept Car'/><category term='pneumonia'/><category term='LOUD'/><category term='SQL'/><category term='funny'/><category term='web'/><category term='David Beckham'/><category term='Chitika'/><category term='Miracle'/><category term='Parenting'/><category term='Model'/><category term='Online'/><category term='web marketing'/><category term='Resident Evil'/><category term='EFFECTS'/><category term='date'/><category term='Quote'/><category term='Adsense'/><category term='Healthy Lifestyle'/><category term='KISS'/><category term='Origami'/><category term='Productivity'/><category term='Season 2'/><category term='Poker Face'/><category term='iPod'/><category term='Creative'/><category term='Debunking'/><category term='Marketing'/><category term='REN'/><category term='seo ranking'/><category term='advertisement'/><category term='e-Book'/><category term='eBay.co.uk'/><category term='News'/><category term='Ad Placement'/><category term='malaysia'/><category term='Adibah Noor'/><category term='Baby Gives The Evil Eye'/><category term='Rambo IV'/><category term='Danger to Baby'/><category term='lol'/><category term='Nano Video'/><category term='Concert'/><category term='Season 2 Episode 9'/><category term='The Line'/><category term='RPU'/><category term='Exercise'/><category term='different font'/><category term='Select'/><category term='automobile'/><category term='Danica Patrick'/><category term='Crop Art'/><category term='Iphone Applegirl'/><category term='Paper Art'/><category term='sqll'/><category term='Tags: Haelth'/><category term='Map'/><category term='goodle.com'/><category term='Whitney Houston'/><category term='format datetime'/><category term='Count'/><category term='Japan'/><category term='Flu'/><category term='HTML'/><category term='Hazami'/><category term='Honda'/><category term='Microsoft Sql Server'/><category term='glee cover'/><category term='Bear'/><category term='DotA allstars'/><category term='glove one'/><category term='TV Commercial'/><category term='Convicting'/><category term='Twitter'/><category term='China-made'/><category term='Doctor'/><category term='background color'/><category term='Heroes'/><category term='Weekly Quotes'/><category term='SQL Server'/><category term='Paddy Field'/><category term='Episode 4'/><category term='Episode 06'/><category term='Chemical'/><category term='Mobilephone'/><category term='DotA'/><category term='Internet Marketing'/><category term='eBay.com'/><category term='Rebates'/><category term='just for fun'/><category term='on the move'/><category term='Ultravoilet'/><category term='Paper Crafter'/><category term='Vicks'/><category term='Food'/><category term='bread art'/><category term='Cool Stuff'/><category term='Higher'/><category term='checking'/><category term='v6.52d'/><category term='Loose Photos'/><category term='Google Adsense'/><category term='Book'/><category term='Optimizing'/><category term='NBC Heroes'/><category term='Milla Jovovich'/><category term='Dragon Wars'/><category term='BMW GINA'/><category term='top 10'/><category term='Pharmaceutical'/><category term='man in the mirror'/><category term='crazy funny'/><category term='cool art'/><category term='sbread'/><category term='slove ad news'/><category term='Cautionary Tales'/><category term='Jaclyn Victor'/><category term='programming'/><category term='bonue'/><category term='lousy web hosting'/><category term='How to'/><category term='Super Cool'/><category term='YouTube'/><category term='Art'/><category term='Optimize'/><category term='dog'/><category term='free style drawing'/><category term='Paper Craft'/><category term='Mr T'/><category term='Simpsons'/><category term='Master piece'/><category term='Purpose'/><category term='dead'/><category term='Battle'/><category term='Jojo'/><category term='DANGER'/><category term='Recognition'/><category term='SEO'/><category term='food art'/><category term='Mathematical Values'/><category term='fun facts'/><category term='Touching'/><category term='funny joke'/><category term='joke'/><category term='quotes'/><category term='animal kingddom'/><category term='Leap Year'/><category term='Volkswagen'/><category term='Tricks'/><category term='Sculpture'/><title type='text'>mAvEriCk ArTs Inc - DoTA,SEO,Internet Marketing</title><subtitle type='html'>mAvEriCk's journey and thought's on life..</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default?start-index=101&amp;max-results=100'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>143</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-17795373.post-8278450289012709133</id><published>2011-07-19T19:05:00.000+08:00</published><updated>2011-07-19T19:05:52.831+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Official Batman'/><category scheme='http://www.blogger.com/atom/ns#' term='The Dark Knight Rises'/><category scheme='http://www.blogger.com/atom/ns#' term='Movie Trailer 2012'/><title type='text'>The Dark Knight Rises: Official Batman Movie Trailer 2012</title><content type='html'>&lt;img alt="The Dark Knight Rises: Official Batman Movie Trailer 2012" border="0" src="http://4.bp.blogspot.com/--RzVi0hS2eo/TiVkkShDDJI/AAAAAAAAA5o/oKB_ZyNXmWI/s1600/The-Dark-Knight-Rises-Batman-movie-poster-2012.jpg" title="The Dark Knight Rises: Official Batman Movie Trailer 2012" /&gt; &lt;br /&gt;&lt;br /&gt;The sequel of &lt;b&gt;Batman &lt;/b&gt;movie is back with &lt;b&gt;Christian Bale&lt;/b&gt; returns as the caped crusader in the new Christopher Nolan‘s film, coming to theaters in summer 2012. Check out the latest official Batman movie trailer, “The Dark Knight Rises" . Watch the movie trailer here &amp;gt;&amp;gt; &lt;br /&gt;&lt;h2 class="entry-title"&gt;&lt;a href="http://pjlighthouse.com/movie-the-dark-knight-rises-official-batman-teaser-trailer-2012/" rel="bookmark" title="Movie: The Dark Knight Rises: Official Batman Teaser Trailer 2012"&gt;Movie: The Dark Knight Rises: Official Batman Teaser Trailer 2012&lt;/a&gt;&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-8278450289012709133?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/8278450289012709133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=8278450289012709133' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8278450289012709133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8278450289012709133'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2011/07/dark-knight-rises-official-batman-movie.html' title='The Dark Knight Rises: Official Batman Movie Trailer 2012'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/--RzVi0hS2eo/TiVkkShDDJI/AAAAAAAAA5o/oKB_ZyNXmWI/s72-c/The-Dark-Knight-Rises-Batman-movie-poster-2012.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-4879094302741545226</id><published>2011-07-19T18:57:00.002+08:00</published><updated>2011-07-19T19:00:57.644+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Facebook'/><category scheme='http://www.blogger.com/atom/ns#' term='Harper seven Beckham'/><category scheme='http://www.blogger.com/atom/ns#' term='Twitter'/><category scheme='http://www.blogger.com/atom/ns#' term='baby  Harper'/><category scheme='http://www.blogger.com/atom/ns#' term='David Beckham'/><title type='text'>David Beckham baby  Harper 7 Beckham on Facebook &amp; Twitter</title><content type='html'>&lt;img &amp;="" 7="" alt="David" baby="" beckham="" border="0" facebook="" harper="" height="271" on="" src="http://2.bp.blogspot.com/-HNyhcHOehLo/TiVjEv1g6iI/AAAAAAAAA5g/WbfAUhml6EE/s400/baby-harper-7-david%2Bbeckham-babygirl-photo-2.jpg" title="David Beckham baby  Harper 7 Beckham on Facebook &amp;amp; Twitter" twitter"="" width="400" /&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;DAVID Beckham&lt;/b&gt; looks the proudest dad in the world, as he shows off new daughter Harper Seven for the first time in photos released today.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The black and white shot shows Becks cuddling his new baby who is wrapped up in a white blanket.&lt;br /&gt;&lt;br /&gt;Victoria Beckham, 37, posted the photo on Twitter with the caption: "Daddy's little girl".&lt;br /&gt;&lt;br /&gt;A second photograph, below, showing new mum Posh and Harper was posted on to David's Facebook page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The former Spice Girl gave birth on July 10th by caesarean in Los Angeles.  &lt;br /&gt;LA Galaxy star David, 36, shed tears of joy when his 7lb 10oz daughter was  born.  &lt;br /&gt;The footie ace, whose Man Utd and England number was seven, announced the name  nine hours after her birth.  &lt;br /&gt;&lt;br /&gt;He wrote on his Facebook page: "I am so proud and excited to announce the  birth of our daughter Harper Seven Beckham. She weighed a healthy 7lb and  10oz.  &lt;br /&gt;And in a series of online videos explained: "A lot of thought goes into  our children's names and Harper was a name that we've loved for a long time  for a couple of reasons." &lt;br /&gt;&lt;br /&gt;"One reason is Harper's an old English name which we loved and one of the  other reasons was Victoria's favourite book is To Kill A Mockingbird and the  author was Harper Lee. It's a very strong, passionate book. That's where  Harper came from." &lt;br /&gt;"To have another girl in the family is really incredible. We've got three  beautiful healthy boys already and we're so lucky to have that and now to  have a beautiful little girl.  &lt;br /&gt;&lt;br /&gt;"Having a daughter is a whole new thing. Having pink in the house, having  lilac in the house... and you have to be a lot more delicate with girls than  boys and I'm not used to that so it's a whole new experience." &lt;br /&gt;Yesterday, Becks sported a brand new pair of boots - with the names of his  four children printed on one side.  &lt;br /&gt;&lt;br /&gt;&lt;img alt="Happy family ... Becks' trainers have his kids names on them" src="http://img.thesun.co.uk/multimedia/archive/01345/becks3_1345856a.jpg" style="height: 400px; width: 682px;" /&gt; &lt;br /&gt;Happy family ... Becks' trainers have his kids names on them&lt;br /&gt;&lt;br /&gt;Brooklyn, 12, Romeo, eight, Cruz, six, and Harper all get a mention on the  footwear.  &lt;br /&gt;&lt;br /&gt;He showed off his new trainers at a match in Los Angeles California.  &lt;br /&gt;&lt;br /&gt;LA Galaxy played against Real Madrid, who won the match 4-1.  &lt;br /&gt;&lt;br /&gt;It was the first time Beckham has come up against his old side since moving to  the United States in 2007  &lt;br /&gt;&lt;br /&gt;Last week Posh gushed in a Twitter post: "Baby Harper is the most beautiful  baby girl I have ever seen. We all feel so blessed and the boys love their  baby sister so much!!! X VB." &lt;br /&gt;They have agreed that Harper will be their last child.  &lt;br /&gt;&lt;i&gt;A wise move as otherwise Becks would need to get bigger boots... &lt;/i&gt; &lt;br /&gt;&lt;br /&gt;&lt;div class="margin-top-5 padding-bottom-5 margin-right-10 float-left" style="width: 682px;"&gt;&lt;div class="text-center"&gt;&lt;img alt="In the pink ... Becks' new trainers" src="http://img.thesun.co.uk/multimedia/archive/01345/becks2_1345855a.jpg" style="height: 400px; width: 682px;" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="http://www.thesun.co.uk/sol/homepage/showbiz/bizarre/3699482/First-photographs-of-David-and-Victorias-new-baby-girl-Harper-Seven-Beckham.html#ixzz1SY0W65uU" style="color: #003399;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h1&gt;Harper Seven Beckham&lt;/h1&gt;&lt;br /&gt;The Beckhams' firstborn, Brooklyn, was allegedly named after the New York borough where he was conceived, so it's possible that Romeo and Cruz's little sister is called after the times mum and dad did the business.&lt;br /&gt;&lt;br /&gt;Cruel wags suggest that Harper might also be named after David's favourite Marx brother "because Groucher didn't sound right", but it's more likely that the name is a tribute to novelist Harper Lee (she wrote To Kill A Mockingbird) and to David's old squad number.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Source&lt;/b&gt;:  http://www.thesun.co.uk/sol/homepage/showbiz/bizarre/3699482/First-photographs-of-David-and-Victorias-new-baby-girl-Harper-Seven-Beckham.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-4879094302741545226?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/4879094302741545226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=4879094302741545226' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/4879094302741545226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/4879094302741545226'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2011/07/david-beckham-baby-harper-7-beckham-on.html' title='David Beckham baby  Harper 7 Beckham on Facebook &amp; Twitter'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-HNyhcHOehLo/TiVjEv1g6iI/AAAAAAAAA5g/WbfAUhml6EE/s72-c/baby-harper-7-david%2Bbeckham-babygirl-photo-2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-6004914055184286075</id><published>2011-07-07T18:18:00.001+08:00</published><updated>2011-07-19T18:44:40.661+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='8tv showdown'/><category scheme='http://www.blogger.com/atom/ns#' term='ecx'/><title type='text'>ELECOLDXHOT (ECX) - 8TV Showdown 2011 Final Champion!!</title><content type='html'>&lt;img alt=" ELECOLDXHOT (ECX) - 8TV Showdown 2011 Final Champion" border="0" height="284" src="http://3.bp.blogspot.com/-PCqR_olMpiU/ThrO1HLqWPI/AAAAAAAAAzs/zrJM8afliyk/s400/ECX-ELECOLDXHOT-DANCE-Showdown-2011-final-CHAMPION-8TV.jpg" title=" ELECOLDXHOT (ECX) - 8TV Showdown 2011 Final Champion" width="400" /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; SHAH ALAM:&lt;/strong&gt; Five-member Elecoldxhot danced their way  into the hearts of the audience at 8TV's Showdown 2011 finale at  i-City, Shah Alam last night, taking home a cool RM50,000.&lt;br /&gt;Comprising Ooi Kok Wei, Yin Zhen Huang, Yap Jin Hou, Ang Joo Yee and  Lin Yit Zhou, they emerged victorious in the final battle against HMC  Phlow.&lt;br /&gt;&lt;br /&gt;"We came to win, and we're glad all our efforts over the past six months paid off, so it was all worth it," said Yin.Ooi chipped in: "We are thinking of competing at international level  with our target being the World Hip-Hop Dance Championship."&lt;br /&gt;&lt;br /&gt;Elecoldxhot will be taking a week off to enjoy their hard-earned prize money.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-K_89wmAPH-w/ThrP0hPvWNI/AAAAAAAAAzw/TXUuOd1Gxe0/s1600/showdown-2011-ECX-8TV.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-K_89wmAPH-w/ThrP0hPvWNI/AAAAAAAAAzw/TXUuOd1Gxe0/s1600/showdown-2011-ECX-8TV.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Yin added: "We will definitely have a good holiday, now that we are each richer by RM10,000."&lt;br /&gt;Mixing dance moves influenced by American superstars Justin  Timberlake and the late Michael Jackson to South Korean sensation Rain,  the Elecoldxhot quintet were clearly a cut above the other dance  finalists, namely, HMC Phlow, Rokusteps and Bounce Stepperz.&lt;br /&gt;&lt;br /&gt;Elecoldxhot convincingly won with their every performance, and  delivered their best choreography during songs like In For The Kill (by  British duo La Roux) and Welcome To My Hood (by American trio DJ Khaled,  T-Pain and Busta Rhymes).&lt;br /&gt;&lt;br /&gt;Rokusteps was eliminated after the first round for having the least text votes.&lt;br /&gt;&lt;br /&gt;Next to leave was Bounce Stepperz after their stellar performance failed to garner enough votes for the final face-off.&lt;br /&gt;&lt;br /&gt;Showdown 2011 was hosted by radio channel Fly FM deejay Hafiz Hatim  and also featured performances by past Showdown winners, with Floor  Fever partnering Lee Lessm, and GBC teaming up with JB Breakerz.&lt;br /&gt;&lt;br /&gt;Watch all ECX amazing dance clips here &amp;gt;&amp;gt;&lt;br /&gt;&lt;h1 class="entry-title" style="color: blue;"&gt;&lt;u&gt;&lt;a href="http://pjlighthouse.com/8tv-final-showdown-2011-dance-crew-champion-elecoldxhot-ecx/"&gt;8TV Final Showdown 2011 Dance Crew Champion ELECOLDXHOT (ECX)&lt;/a&gt;&lt;/u&gt;&lt;/h1&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-6004914055184286075?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/6004914055184286075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=6004914055184286075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/6004914055184286075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/6004914055184286075'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2011/07/elecoldxhot-ecx-8tv-showdown-2011-final.html' title='ELECOLDXHOT (ECX) - 8TV Showdown 2011 Final Champion!!'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-PCqR_olMpiU/ThrO1HLqWPI/AAAAAAAAAzs/zrJM8afliyk/s72-c/ECX-ELECOLDXHOT-DANCE-Showdown-2011-final-CHAMPION-8TV.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-1089071692061025541</id><published>2011-05-11T18:12:00.000+08:00</published><updated>2011-07-11T18:18:25.757+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='glee cover'/><category scheme='http://www.blogger.com/atom/ns#' term='marry you'/><category scheme='http://www.blogger.com/atom/ns#' term='muisc'/><category scheme='http://www.blogger.com/atom/ns#' term='music bruno mars'/><category scheme='http://www.blogger.com/atom/ns#' term='marry you lyrics'/><title type='text'>Bruno Mars – Marry You Original Live &amp; Glee Cast Cover Version Lyrics</title><content type='html'>&lt;img border="0" height="264" src="http://1.bp.blogspot.com/-VOcapbXZ_zE/ThrNyspiinI/AAAAAAAAAzk/nZ58W_pGT8Y/s320/Music-Marry-You-Bruno-Mars-GLEE-mtv-lyrics.jpg" title="Bruno Mars – Marry You Original Live &amp; Glee Cast Cover Version Lyrics"  alt="Bruno Mars – Marry You Original Live &amp; Glee Cast Cover Version Lyrics" width="320" /&gt; &lt;br /&gt;Check out one of my favorite &lt;b&gt;Bruno Mars&lt;/b&gt; song, “&lt;b&gt;Marry You&lt;/b&gt;” &lt;br /&gt;&lt;br /&gt;loving  the &lt;b&gt;Glee&lt;/b&gt; version more!!!&lt;br /&gt;&lt;br /&gt;Enjoy both version plus some of &lt;b&gt;Bruno Mars’s Marry You live&lt;/b&gt; version&lt;br /&gt;&lt;br /&gt;Click link below to view both the version &amp;gt;&amp;gt;&lt;br /&gt;&lt;h1 class="entry-title"&gt;&lt;a href="http://pjlighthouse.com/music-bruno-mars-marry-you-original-live-glee-cast-version-lyrics/"&gt;Music: Bruno Mars – Marry You Original Live &amp;amp; Glee Cast Version + Lyrics&lt;/a&gt;&lt;/h1&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-1089071692061025541?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/1089071692061025541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=1089071692061025541' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/1089071692061025541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/1089071692061025541'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2011/05/bruno-mars-marry-you-original-live-glee.html' title='Bruno Mars – Marry You Original Live &amp; Glee Cast Cover Version Lyrics'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-VOcapbXZ_zE/ThrNyspiinI/AAAAAAAAAzk/nZ58W_pGT8Y/s72-c/Music-Marry-You-Bruno-Mars-GLEE-mtv-lyrics.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-4868987892458825805</id><published>2011-04-11T18:02:00.032+08:00</published><updated>2011-07-11T18:12:09.015+08:00</updated><title type='text'>Bank of America Routing Number FAQs</title><content type='html'>&lt;table border="0" cellpadding="0" cellspacing="0" class="standard-font" style="width: 575px;" summary="Content Table"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2" valign="top" width="575"&gt;&lt;img alt="Bank of America Routing Number FAQs" border="0" height="110" src="http://4.bp.blogspot.com/-9Tgov1sSkCs/ThrMJCl2r0I/AAAAAAAAAzg/lHXenhEvyj0/s400/BANK-OF-AMERICA-logo.gif" title="Bank of America Routing Number FAQs" width="400" /&gt; &lt;br /&gt;&lt;h3 class="sectiontitle"&gt;What is the ABA routing number?&lt;/h3&gt;&lt;/td&gt;     &lt;/tr&gt;&lt;tr&gt;      &lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;div class="paragraph"&gt;The ABA routing number is a 9–digit number  assigned to financial institutions by The American Bankers Association  (ABA) to identify the financial institution upon which a payment was  drawn. Routing numbers are sometimes referred to as “check routing  numbers”, “ABA numbers”, or “routing transit numbers” (RTN). Routing  numbers may differ depending on where your account was opened and the  type of transaction made.&lt;/div&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="standard-font" style="width: 575px;" summary="Content Table"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2" valign="top" width="575"&gt;&lt;h3 class="sectiontitle"&gt;What is the routing number for my Bank of America account?&lt;/h3&gt;&lt;/td&gt;     &lt;/tr&gt;&lt;tr&gt;      &lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;div class="paragraph"&gt;Routing numbers depend on the type of transaction made.  Please &lt;a href="http://www.bankofamerica.com/state.cgi?section=signin" title="sign in to online banking"&gt;sign in&lt;/a&gt; to Online Banking and click on the &lt;b&gt;Show Routing Numbers&lt;/b&gt;  link on the Accounts Details page to find your routing numbers  (available for all states except Florida, Illinois, Missouri and Texas).   If your account was opened in Florida, Illinois, Missouri or Texas, or  you do not have access to Online Banking, please contact customer  service by calling 1.800.432.1000 to get your routing numbers. Customer  service associates are available Monday through Friday from 7 a.m. to 10  p.m.; Saturday and Sunday from 8 a.m. to 5 p.m., local time.&lt;/div&gt;&lt;br /&gt;&lt;div class="paragraph"&gt;You  may also find the correct routing number for the type of transaction  you want to make by using the dropdown menu and choosing the state in  which your account was opened.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="paragraph"&gt;Sample Bank of America Routing Number:&lt;/div&gt;&lt;table border="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: x-small;"&gt;&lt;b&gt;Alaska&lt;/b&gt;&lt;/span&gt;        &lt;/td&gt;        &lt;td&gt;&amp;nbsp;        &lt;/td&gt;       &lt;/tr&gt;&lt;tr&gt;               &lt;td align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: x-small;"&gt;Paper (ex. Ordering Checks):&lt;/span&gt;        &lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: x-small;"&gt;051000017&lt;/span&gt;        &lt;/td&gt;       &lt;/tr&gt;&lt;tr&gt;        &lt;td align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: x-small;"&gt;Electronic (ex. Direct Deposit/Automatic Payment):&lt;/span&gt;        &lt;/td&gt;        &lt;td&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: x-small;"&gt;051000017&lt;/span&gt;        &lt;/td&gt;       &lt;/tr&gt;&lt;tr&gt;        &lt;td align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: x-small;"&gt;Wire Transfer:&lt;/span&gt;        &lt;/td&gt;        &lt;td align="left"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: x-small;"&gt;026009593&lt;/span&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;/td&gt;&lt;td align="left"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;div class="paragraph"&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table summary="Bank of America ABA Routing Number"&gt;&lt;tbody&gt;&lt;tr scope="row"&gt;&lt;th&gt;&lt;b&gt;California, North&lt;/b&gt;&lt;/th&gt;                                     &lt;td&gt;&lt;br /&gt;&lt;/td&gt;                                  &lt;/tr&gt;&lt;tr scope="row"&gt;                                     &lt;th&gt;Paper (ex. Ordering Checks):&lt;/th&gt;                                     &lt;td&gt;121000358&lt;/td&gt;                                  &lt;/tr&gt;&lt;tr scope="row"&gt;                                     &lt;th&gt;Electronic (ex. Direct Deposit/Automatic Payment):&lt;/th&gt;                                     &lt;td&gt;121000358&lt;/td&gt;                                  &lt;/tr&gt;&lt;tr scope="row"&gt;                                     &lt;th&gt;Wire Transfer:&lt;/th&gt;                                     &lt;td&gt;026009593&lt;/td&gt;                                  &lt;/tr&gt;&lt;/tbody&gt;                            &lt;/table&gt;&lt;table summary="Bank of America ABA Routing Number"&gt;&lt;tbody&gt;&lt;tr scope="row"&gt;                                     &lt;th&gt;&lt;span class="ada-hidden"&gt;State:&lt;/span&gt;&lt;b&gt;California, South&lt;/b&gt;&lt;/th&gt;                                     &lt;td&gt;&lt;br /&gt;&lt;/td&gt;                                  &lt;/tr&gt;&lt;tr scope="row"&gt;                                     &lt;th&gt;Paper (ex. Ordering Checks):&lt;/th&gt;                                     &lt;td&gt;122000661&lt;/td&gt;                                  &lt;/tr&gt;&lt;tr scope="row"&gt;                                     &lt;th&gt;Electronic (ex. Direct Deposit/Automatic Payment):&lt;/th&gt;                                     &lt;td&gt;121000358&lt;/td&gt;                                  &lt;/tr&gt;&lt;tr scope="row"&gt;                                     &lt;th&gt;Wire Transfer:&lt;/th&gt;                                     &lt;td&gt;026009593&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;==&lt;br /&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="standard-font" style="width: 575px;" summary="Content Table"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2" valign="top" width="575"&gt;&lt;h3 class="sectiontitle"&gt;How do I know which ABA routing number to use?&lt;/h3&gt;&lt;/td&gt;     &lt;/tr&gt;&lt;tr&gt;      &lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;div class="paragraph"&gt;Routing numbers depend on the type of transaction made.&lt;/div&gt;&lt;ul class="grey-bullet"&gt;&lt;li class="standard-text"&gt;To reorder checks, use the number for paper transactions.&lt;/li&gt;&lt;li class="standard-text"&gt;To set up direct deposits (e.g., to  receive paychecks or IRS refunds) or outgoing payments to other  financial institutions, use the number for electronic transactions.&lt;/li&gt;&lt;li class="standard-text"&gt;To receive incoming domestic or international wire transfers, use the number for wire transfers.&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="standard-font" style="width: 575px;" summary="Content Table"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="standard-font" style="width: 575px;" summary="Content Table"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2" valign="top" width="575"&gt;&lt;h3 class="sectiontitle"&gt;What if my state has more than one routing number?&lt;/h3&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;      &lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;div class="paragraph"&gt;In California, Illinois, Florida, Missouri,  and Texas, there are multiple processing regions, so more information  may be needed to determine the routing number for your account.   Customer service associates are available to help you identify the  correct routing number.  Please contact customer service at  1.800.432.1000 (California customers call 1.800.622.8731). Customer  service associates are available Monday through Friday from 7 a.m. to 10  p.m., and Saturday and Sunday from 8 a.m. to 5 p.m., local time.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="standard-font" style="width: 575px;" summary="Content Table"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="standard-font" style="width: 575px;" summary="Content Table"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2" valign="top" width="575"&gt;&lt;h3 class="sectiontitle"&gt;What state should I select if I opened my account online or by mail?&lt;/h3&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;     &lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;div class="paragraph"&gt;Please&lt;a href="http://www.blogger.com/goog_1371502660"&gt; &lt;/a&gt;&lt;a href="http://www.blogger.com/goog_1371502660" title="sign in to online banking"&gt;sign in&lt;/a&gt; to Online Banking and click on the &lt;b&gt;Show Routing Numbers&lt;/b&gt;  link on the Accounts Details page to find your routing numbers  (available for all states except Florida, Illinois, Missouri and Texas).   If your account was opened in Florida, Illinois, Missouri or Texas,  you do not have access to Online Banking or you do not know the state in  which your account was opened, please contact customer service by  calling 1.800.432.1000 to get your routing numbers. Customer service  associates are available Monday through Friday from 7 a.m. to 10 p.m.;  Saturday and Sunday from 8 a.m. to 5 p.m., local time.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="standard-font" style="width: 575px;" summary="Content Table"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2" valign="top" width="575"&gt;&lt;h3 class="sectiontitle"&gt;What is my routing number if I opened my account through a military bank?&lt;/h3&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;     &lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;div class="paragraph"&gt;If you opened your account through a military  bank, a customer service associate can help you identify the correct  routing number. Please contact customer service at 1.800.334.1920 Monday  through Friday 7 a.m. to midnight ET and Saturday 10 a.m. to 4 p.m. ET.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="standard-font" style="width: 575px;" summary="Content Table"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2" valign="top" width="575"&gt;&lt;h3 class="sectiontitle"&gt;Where is the Bank of America transit/ABA routing number on my check?&lt;/h3&gt;&lt;/td&gt;    &lt;/tr&gt;&lt;tr&gt;&lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;div class="paragraph"&gt;The sample check graphic below shows where the ABA routing number can be found on your checks.&lt;/div&gt;&lt;img alt="Bank of America Routing Number FAQs" border="0" src="http://4.bp.blogspot.com/-1hvDYOsIku4/ThrLg-0hCII/AAAAAAAAAzc/83Z3JP26zf0/s1600/BANK-of-AMERICA-aba_routing_number_CHECK.gif" title="Bank of America Routing Number FAQs" /&gt; &lt;br /&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="paragraph"&gt;If you do not have checks, please use the  dropdown menu above to choose the state of the banking center where you  opened your account or  sign in  to Online Banking and click on the &lt;b&gt;Show Routing Numbers&lt;/b&gt;  link on the Accounts Details page to find your routing numbers  (available for all states except Florida, Illinois, Missouri and Texas).     &lt;/div&gt;&lt;div class="paragraph"&gt;If you opened your account online or by mail,  please contact customer service at 1.800.432.1000 (California customers  call 1.800.622.8731, Washington and Idaho customers call  1.800.442.6680).  Customer service associates are available Monday  through Friday from 7 a.m. to 10 p.m. and Saturday and Sunday from 8  a.m. to 5 p.m., local time.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="standard-font" style="width: 575px;" summary="Content Table"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2" valign="top" width="575"&gt;&lt;h3 class="sectiontitle"&gt;What is the Automated Clearing House (ACH) number?&lt;/h3&gt;&lt;/td&gt;     &lt;/tr&gt;&lt;tr&gt;      &lt;td class="standard-text" colspan="2" valign="top"&gt;&lt;div class="paragraph"&gt;For ACH transactions, please use the routing number for electronic transactions.&lt;/div&gt;&lt;br /&gt;&lt;div class="paragraph"&gt;The Automated Clearing House (ACH) is an  electronic payment delivery system which allows you to make payments or  collect funds electronically through the ACH network. We can help you  take advantage of the speed and efficiency of electronic payments and  collections available through the ACH network, giving you better control  over the timing of payments that post to your bank account(s). ACH  transactions are usually next-day entries when exchanged with other  financial institutions. ACH functions include direct deposits and check  conversions from paper to electronic.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="paragraph"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="paragraph"&gt;&lt;b&gt;Source&lt;/b&gt;: http://www.bankofamerica.com/ &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-4868987892458825805?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/4868987892458825805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=4868987892458825805' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/4868987892458825805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/4868987892458825805'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2011/04/bank-of-america-routing-number-faqs.html' title='Bank of America Routing Number FAQs'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-9Tgov1sSkCs/ThrMJCl2r0I/AAAAAAAAAzg/lHXenhEvyj0/s72-c/BANK-OF-AMERICA-logo.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-2500274213288287203</id><published>2011-03-09T13:42:00.000+08:00</published><updated>2011-03-09T13:42:37.533+08:00</updated><title type='text'>Transformers Robot Parade - Autobots vs. Decepticons</title><content type='html'>&lt;a href="http://www.pjlighthouse.info/2007/07/transformers-robot-parade-autobots-vs-decepticons/"&gt;Transformers Robot Parade - Autobots vs. Decepticons&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-2500274213288287203?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.pjlighthouse.info/2007/07/transformers-robot-parade-autobots-vs-decepticons/' title='Transformers Robot Parade - Autobots vs. Decepticons'/><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/2500274213288287203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=2500274213288287203' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/2500274213288287203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/2500274213288287203'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2011/03/transformers-robot-parade-autobots-vs.html' title='Transformers Robot Parade - Autobots vs. Decepticons'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-1513277882832159843</id><published>2011-02-15T02:47:00.000+08:00</published><updated>2011-02-25T02:55:56.732+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TV Commercial'/><category scheme='http://www.blogger.com/atom/ns#' term='The Force'/><category scheme='http://www.blogger.com/atom/ns#' term='Volkswagen'/><category scheme='http://www.blogger.com/atom/ns#' term='Star Wars'/><category scheme='http://www.blogger.com/atom/ns#' term='crazy funny'/><title type='text'>Crazy Funny Volkswagen Commercial Star Wars The Force</title><content type='html'>&lt;img title="Funny,VW Volkswagen Commercial,StarWarsForce" src="http://www.pjlighthouse.info/wp-content/uploads/2011/02/Funny-VW-Volkswagen-Commercial-StarWars-Force1.jpg" alt="Funny VW Volkswagen Commercial the Force" height="252" width="364" /&gt; A very funny &lt;strong&gt;Volkswagen TV Commercial&lt;/strong&gt; which features a pint-sized &lt;strong&gt;Darth Vader&lt;/strong&gt; who uses the &lt;strong&gt;Force &lt;/strong&gt;when he discovers the all-new 2012 &lt;strong&gt;Passat &lt;/strong&gt;in the driveway. It leverages humor and the unforgettable &lt;strong&gt;Star Wars™&lt;/strong&gt; score to create an emotional commercial. Check out the clip below &gt;&gt; &lt;a href="http://www.pjlighthouse.info/2011/02/funny-volkswagen-commercial-the-force"&gt;Volkswagen Commercial Star Wars The Force&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-1513277882832159843?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/1513277882832159843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=1513277882832159843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/1513277882832159843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/1513277882832159843'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2011/02/crazy-funny-volkswagen-commercial-star.html' title='Crazy Funny Volkswagen Commercial Star Wars The Force'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-2409592719656595097</id><published>2011-01-02T22:31:00.002+08:00</published><updated>2011-01-19T22:39:54.999+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Danicar'/><category scheme='http://www.blogger.com/atom/ns#' term='HotWheels'/><category scheme='http://www.blogger.com/atom/ns#' term='Danica Patrick'/><category scheme='http://www.blogger.com/atom/ns#' term='Concept Car'/><category scheme='http://www.blogger.com/atom/ns#' term='Loose Photos'/><title type='text'>HotWheels Danicar Loose Photos Danica Patrick Concept Car</title><content type='html'>&lt;p&gt;&lt;img class="alignnone size-full wp-image-484" title="DANICAR-2011-HotWheels-Dannicar-Danica-Patrick-ConceptCar-Yellow-NewRelease" alt="DANICAR-2011-HotWheels-Dannicar-Danica-Patrick-ConceptCar-Yellow-NewRelease" src="http://www.mymatchboxclub.com/blog/wp-content/uploads/2010/10/2011-HotWheels-Dannicar-Danica-Patrick-ConceptCar-Yellow-NewRelease.jpg" width="342" height="256" /&gt;Feast your eyes on the latest loose &lt;a title="What is the DANICAR - Danica Patrick Hotwheels car" href="http://www.mymatchboxclub.com/blog/2010/04/hot-wheels-what-is-the-danicar/"&gt;&lt;strong&gt;DANICAR&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;2011 Hot Wheels car &lt;/strong&gt;from &lt;strong&gt;Mattel&lt;/strong&gt;.. The amazing &lt;strong&gt;concept car&lt;/strong&gt; specially designed according to &lt;strong&gt;Danica Patrick&lt;/strong&gt; imagination.. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span id="more-475"&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img style="WIDTH: 419px; HEIGHT: 167px" class="alignnone size-full wp-image-477" title="2011-HotWheels-Dannicar-Danica-Patrick-ConceptCar-Yellow-01" alt="DANICAR-2011-HotWheels-Dannicar-Danica-Patrick-ConceptCar-Yellow-01" src="http://www.mymatchboxclub.com/blog/wp-content/uploads/2010/10/2011-HotWheels-Dannicar-Danica-Patrick-ConceptCar-Yellow-01.jpg" width="587" height="270" /&gt; &lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;2011 Hot Wheels Danicar&lt;/strong&gt; side view&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img style="WIDTH: 422px; HEIGHT: 149px" title="DANICAR-2011-HotWheels-Dannicar-Danica-Patrick-ConceptCar-Yellow-01" alt="DANICAR-2011-HotWheels-Dannicar-Danica-Patrick-ConceptCar-Yellow-01" src="http://www.mymatchboxclub.com/blog/wp-content/uploads/2010/10/2011-HotWheels-Dannicar-Danica-Patrick-ConceptCar-Yellow-02.jpg" width="585" height="199" /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;View more here &gt;&gt; &lt;a href="http://www.mymatchboxclub.com/blog/2010/10/hot-wheels-danicar-loose-photos-danica-patrick-concept-car"&gt;Hot Wheels Danica Patrick Concept Car - myMatchboxClub.com&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-2409592719656595097?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/2409592719656595097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=2409592719656595097' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/2409592719656595097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/2409592719656595097'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2011/01/hotwheels-danicar-loose-photos-danica.html' title='HotWheels Danicar Loose Photos Danica Patrick Concept Car'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-1548452125075135727</id><published>2011-01-01T15:04:00.000+08:00</published><updated>2011-01-26T16:31:32.797+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='format datetime'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='date'/><category scheme='http://www.blogger.com/atom/ns#' term='sqll'/><category scheme='http://www.blogger.com/atom/ns#' term='How to'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Sql Server'/><title type='text'>How to format datetime and date in Microsoft SQL Server</title><content type='html'>&lt;p style="font-family: Verdana; font-size: 10pt; margin: 0pt;"&gt;Execute  the following Microsoft SQL Server T-SQL datetime and date formatting  scripts in Management Studio Query Editor to demonstrate the multitude  of temporal data formats available in SQL Server.&lt;/p&gt; &lt;p style="font-family: Verdana; font-size: 10pt; margin: 0pt;"&gt;First we  start with the conversion options available for sql datetime formats  with century (YYYY or CCYY format). Subtracting 100 from the Style  (format) number will transform dates without century (YY). For example  Style 103 is with century, Style 3 is without century. The default Style  values – Style 0 or 100, 9 or 109, 13 or 113, 20 or 120, and 21 or 121 –  always return the century (yyyy) format.&lt;/p&gt; &lt;p style="font-family: Arial; color: blue; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Microsoft SQL Server T-SQL date and datetime formats&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Date time formats – mssql datetime &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– MSSQL getdate returns current system date and time in standard internal format&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 100&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– mon dd yyyy hh:mmAM (or PM)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                                        &lt;/span&gt;&lt;span style="color: green;"&gt;– Oct  2 2008 11:01AM          &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 101&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– mm/dd/yyyy &lt;/span&gt;&lt;span style="color: black;"&gt;- &lt;/span&gt;&lt;span style="color: green;"&gt;10/02/2008                  &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 102&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– yyyy.mm.dd – 2008.10.02           &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 103&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– dd/mm/yyyy&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 104&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– dd.mm.yyyy&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 105&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– dd-mm-yyyy&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 106&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– dd mon yyyy&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 107&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– mon dd, yyyy&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 108&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– hh:mm:ss&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 109&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– mon dd yyyy hh:mm:ss:mmmAM (or PM)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                                        &lt;/span&gt;&lt;span style="color: green;"&gt;– Oct  2 2008 11:02:44:013AM   &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 110&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– mm-dd-yyyy&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 111&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– yyyy/mm/dd&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 112&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– yyyymmdd&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 113&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– dd mon yyyy hh:mm:ss:mmm&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                                        &lt;/span&gt;&lt;span style="color: green;"&gt;– 02 Oct 2008 11:02:07:577     &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 114&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– hh:mm:ss:mmm(24h)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 120&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– yyyy-mm-dd hh:mm:ss(24h)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 121&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– yyyy-mm-dd hh:mm:ss.mmm&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 126&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– yyyy-mm-ddThh:mm:ss.mmm&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                                        &lt;/span&gt;&lt;span style="color: green;"&gt;– 2008-10-02T10:52:47.513&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL create different date styles with t-sql string functions&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;replace&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: navy;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 111&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘/’&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘ ‘&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: green;"&gt;– yyyy mm dd&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;7&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: navy;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 126&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;                 &lt;/span&gt;&lt;span style="color: green;"&gt;– yyyy-mm&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;right(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: navy;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; 106&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; 8&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;          &lt;/span&gt;&lt;span style="color: green;"&gt;– mon yyyy&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server date formatting function – convert datetime to string&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL datetime functions&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server date formats&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– T-SQL convert dates&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Formatting dates sql server&lt;/p&gt; &lt;p style="margin: 0pt;"&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;CREATE&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;FUNCTION&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; dbo&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: gray; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="font-family: Calibri; color: black; font-size: 11pt;"&gt; &lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: gray; font-size: 10pt;"&gt;(&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;@Datetime &lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;DATETIME&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: gray; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; @FormatMask &lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;VARCHAR&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: gray; font-size: 10pt;"&gt;(&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;32&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: gray; font-size: 10pt;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;RETURNS&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;32&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;AS&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;BEGIN&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt; @StringDate &lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;32&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @StringDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; @FormatMask&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;IF &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CHARINDEX&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;‘YYYY’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;       &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @StringDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;REPLACE&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘YYYY’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                         &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATENAME&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;YY&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; @Datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;IF &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CHARINDEX&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;‘YY’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;       &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @StringDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;REPLACE&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘YY’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                         &lt;/span&gt;&lt;span style="color: gray;"&gt;RIGHT(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATENAME&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;YY&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; @Datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;IF &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CHARINDEX&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;‘Month’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;       &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @StringDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;REPLACE&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘Month’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                         &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATENAME&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;MM&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; @Datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;IF &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CHARINDEX&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;‘MON’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate &lt;/span&gt;&lt;span style="color: blue;"&gt;COLLATE&lt;/span&gt;&lt;span style="color: black;"&gt; SQL_Latin1_General_CP1_CS_AS&lt;/span&gt;&lt;span style="color: gray;"&gt;)&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;       &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @StringDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;REPLACE&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘MON’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                         &lt;/span&gt;&lt;span style="color: gray;"&gt;LEFT(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;UPPER&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATENAME&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;MM&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; @Datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;)),&lt;/span&gt;&lt;span style="color: black;"&gt;3&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;IF &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CHARINDEX&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;‘Mon’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;       &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @StringDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;REPLACE&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘Mon’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                                     &lt;/span&gt;&lt;span style="color: gray;"&gt;LEFT(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATENAME&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;MM&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; @Datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;3&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;IF &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CHARINDEX&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;‘MM’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;       &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @StringDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;REPLACE&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘MM’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                  &lt;/span&gt;&lt;span style="color: gray;"&gt;RIGHT(&lt;/span&gt;&lt;span style="color: red;"&gt;’0′&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEPART&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;MM&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; @Datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;)),&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;IF &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CHARINDEX&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;‘M’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;       &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @StringDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;REPLACE&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘M’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                         &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEPART&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;MM&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; @Datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;)))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;IF &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CHARINDEX&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;‘DD’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;       &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @StringDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;REPLACE&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘DD’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                         &lt;/span&gt;&lt;span style="color: gray;"&gt;RIGHT(&lt;/span&gt;&lt;span style="color: red;"&gt;’0′&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATENAME&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DD&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; @Datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;IF &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CHARINDEX&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;‘D’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;       &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @StringDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;REPLACE&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@StringDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘D’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                                     &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATENAME&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DD&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; @Datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;span style="color: black;"&gt;   &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;RETURN&lt;/span&gt;&lt;span style="color: black;"&gt; @StringDate&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;END&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Microsoft SQL Server date format function test&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– MSSQL formatting dates&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘MM/DD/YYYY’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;           &lt;/span&gt;&lt;span style="color: green;"&gt;– 01/03/2012&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘DD/MM/YYYY’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;           &lt;/span&gt;&lt;span style="color: green;"&gt;– 03/01/2012&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘M/DD/YYYY’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;            &lt;/span&gt;&lt;span style="color: green;"&gt;– 1/03/2012&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘M/D/YYYY’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;             &lt;/span&gt;&lt;span style="color: green;"&gt;– 1/3/2012&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘M/D/YY’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;               &lt;/span&gt;&lt;span style="color: green;"&gt;– 1/3/12&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘MM/DD/YY’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;             &lt;/span&gt;&lt;span style="color: green;"&gt;– 01/03/12&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘MON DD, YYYY’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;         &lt;/span&gt;&lt;span style="color: green;"&gt;– JAN 03, 2012&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘Mon DD, YYYY’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;         &lt;/span&gt;&lt;span style="color: green;"&gt;– Jan 03, 2012&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘Month DD, YYYY’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;       &lt;/span&gt;&lt;span style="color: green;"&gt;– January 03, 2012&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘YYYY/MM/DD’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;           &lt;/span&gt;&lt;span style="color: green;"&gt;– 2012/01/03&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘YYYYMMDD’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;             &lt;/span&gt;&lt;span style="color: green;"&gt;– 20120103&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘YYYY-MM-DD’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;           &lt;/span&gt;&lt;span style="color: green;"&gt;– 2012-01-03&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– CURRENT_TIMESTAMP returns current system date and time in standard internal format&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnFormatDate&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;‘YY.MM.DD’&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;      &lt;/span&gt;&lt;span style="color: green;"&gt;– 12.01.03&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: Calibri; color: black; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/***** SELECTED SQL DATE/DATETIME FORMATS WITH NAMES *****/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL format datetime&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Default format: Oct 23 2006 10:40AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; [Default]&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt;100&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– US-Style format: 10/23/2006&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; [US-Style]&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;char&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt;101&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– ANSI format: 2006.10.23&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; [ANSI]&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;char&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP,&lt;/span&gt;&lt;span style="color: black;"&gt;102&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– UK-Style format: 23/10/2006&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; [UK-Style]&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;char&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt;103&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: gray; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– German format: 23.10.2006&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; [German]&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt;104&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: gray; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– ISO format: 20061023&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; ISO&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt;112&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: gray; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– ISO8601 format: 2008-10-23T19:20:16.003&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; [ISO8601]&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt;126&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: Calibri; color: black; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server datetime formats&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Century date format MM/DD/YYYY usage in a query&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Format dates SQL Server 2005&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;TOP &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      SalesOrderID&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      OrderDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;char&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;10&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 101&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      OrderDateTime &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; AdventureWorks&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;Sales&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;SalesOrderHeader&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Result&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;SalesOrderID      OrderDate               OrderDateTime&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;43697             07/01/2001          2001-07-01 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: Calibri; color: green; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL update datetime column&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL datetime DATEADD&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&lt;span style="color: black;"&gt; Production&lt;/span&gt;&lt;span style="color: navy;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;Product&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; ModifiedDate&lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; ModifiedDate&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; ProductID &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; 1001&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: Calibri; color: green; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– MM/DD/YY date format&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Datetime format sql&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;TOP &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      SalesOrderID&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      OrderDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;8&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 1&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      OrderDateTime &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; AdventureWorks&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;Sales&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;SalesOrderHeader&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;ORDER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;BY&lt;/span&gt;&lt;span style="color: black;"&gt; SalesOrderID &lt;/span&gt;&lt;span style="color: blue;"&gt;desc&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Result&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;SalesOrderID      OrderDate         OrderDateTime&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;75123             07/31/04          2004-07-31 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: Calibri; color: green; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Combining different style formats for date &amp;amp; time&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Datetime formats&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Datetime formats sql&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt; @Date &lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @Date &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’2015-12-22 03:51 PM’&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;CHAR&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;10&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;@Date&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;110&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;SUBSTRING&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@Date&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;12&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;8&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Result: 12-22-2015  3:51PM&lt;/p&gt; &lt;p style="font-family: Calibri; color: green; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Microsoft SQL Server cast datetime to string&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; stringDateTime&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;()&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;as&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Result: Dec 29 2012  3:47AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server date and time functions overview&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server CURRENT_TIMESTAMP function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server datetime functions&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– local NYC – EST – Eastern Standard Time zone&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL DATEADD function – SQL DATEDIFF function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: black;"&gt;                        &lt;/span&gt;&lt;span style="color: green;"&gt;– 2012-01-05 07:02:10.577&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server DATEADD function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;month&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;’2012-12-09′&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;            &lt;/span&gt;&lt;span style="color: green;"&gt;– 2013-02-09 00:00:00.000&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server DATEDIFF function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;day&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;’2012-12-09′&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;’2013-02-09′&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: green;"&gt;– 62&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server DATENAME function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATENAME&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;month&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;   &lt;/span&gt;&lt;span style="color: red;"&gt;’2012-12-09′&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;          &lt;/span&gt;&lt;span style="color: green;"&gt;– December&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATENAME&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;weekday&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’2012-12-09′&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;          &lt;/span&gt;&lt;span style="color: green;"&gt;– Sunday&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server DATEPART function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEPART&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;month&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’2012-12-09′&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;            &lt;/span&gt;&lt;span style="color: green;"&gt;– 12&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server DAY function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DAY&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;’2012-12-09′&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;                        &lt;/span&gt;&lt;span style="color: green;"&gt;– 9&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server GETDATE function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– local NYC – EST – Eastern Standard Time zone&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;()&lt;/span&gt;&lt;span style="color: black;"&gt;                                &lt;/span&gt;&lt;span style="color: green;"&gt;– 2012-01-05 07:02:10.577&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server GETUTCDATE function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– London – Greenwich Mean Time&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETUTCDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;()&lt;/span&gt;&lt;span style="color: black;"&gt;                             &lt;/span&gt;&lt;span style="color: green;"&gt;– 2012-01-05 12:02:10.577&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server MONTH function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;MONTH&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;’2012-12-09′&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;                      &lt;/span&gt;&lt;span style="color: green;"&gt;– 12&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server YEAR function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;YEAR&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;’2012-12-09′&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;                       &lt;/span&gt;&lt;span style="color: green;"&gt;– 2012&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: Calibri; color: green; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: Calibri; color: green; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– T-SQL Date and time function application&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– CURRENT_TIMESTAMP and getdate() are the same in T-SQL&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL first day of the month&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL first date of the month&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL first day of current month – 2012-01-01 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL last day of the month&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL last date of the month&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL last day of current month – 2012-01-31 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: gray;"&gt;,-&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: gray;"&gt;)+&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL first day of last month&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL first day of previous month – 2011-12-01 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,-&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL last day of last month&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL last day of previous month – 2011-12-31 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: gray;"&gt;,-&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;MM&lt;/span&gt;&lt;span style="color: gray;"&gt;,-&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;()))+&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL first day of next month – 2012-02-01 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL last day of next month – 2012-02-28 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: gray;"&gt;,-&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;MM&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;()))+&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL first day of a month – 2012-10-01 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt; @Date &lt;/span&gt;&lt;span style="color: blue;"&gt;datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;;&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @Date &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’2012-10-23′&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@Date&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL last day of a month – 2012-03-31 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt; @Date &lt;/span&gt;&lt;span style="color: blue;"&gt;datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;;&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @Date &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’2012-03-15′&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: gray;"&gt;,-&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;mm&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@Date&lt;/span&gt;&lt;span style="color: gray;"&gt;)+&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL first day of year &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL first day of the year  -  2012-01-01 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;yy&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;yy&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL last day of year  &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL last day of the year   – 2012-12-31 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;yy&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;-&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;yy&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                     &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;yy&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: navy;"&gt;)))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL last day of last year&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL last day of previous year   – 2011-12-31 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: navy;"&gt;,-&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;yy&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;yy&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;0&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: navy;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL calculate age in years, months, days&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL table-valued function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL user-defined function – UDF&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server age calculation – date difference&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Format dates SQL Server 2008&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;USE&lt;/span&gt;&lt;span style="color: black;"&gt; AdventureWorks2008&lt;/span&gt;&lt;span style="color: navy;"&gt;;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;CREATE&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FUNCTION&lt;/span&gt;&lt;span style="color: black;"&gt; fnAge&lt;/span&gt;&lt;span style="color: blue;"&gt;  &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@BirthDate &lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;RETURNS&lt;/span&gt;&lt;span style="color: black;"&gt; @Age &lt;/span&gt;&lt;span style="color: blue;"&gt;TABLE&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;Years  &lt;/span&gt;&lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                   Months &lt;/span&gt;&lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                   &lt;/span&gt;&lt;span style="color: blue;"&gt;Days&lt;/span&gt;&lt;span style="color: black;"&gt;   &lt;/span&gt;&lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;AS&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;BEGIN&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt;  @EndDate     &lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; @Anniversary &lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @EndDate &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Getdate&lt;/span&gt;&lt;span style="color: navy;"&gt;()&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @Anniversary &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Dateadd&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;yy&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Datediff&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;yy&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@BirthDate&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@EndDate&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;@BirthDate&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt;    &lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;INSERT&lt;/span&gt;&lt;span style="color: black;"&gt; @Age&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Datediff&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;yy&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@BirthDate&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@EndDate&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;-&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;CASE&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                                                 &lt;/span&gt;&lt;span style="color: blue;"&gt;WHEN&lt;/span&gt;&lt;span style="color: black;"&gt; @Anniversary &lt;/span&gt;&lt;span style="color: navy;"&gt;&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; @EndDate &lt;/span&gt;&lt;span style="color: blue;"&gt;THEN&lt;/span&gt;&lt;span style="color: black;"&gt; 1&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                                                 &lt;/span&gt;&lt;span style="color: blue;"&gt;ELSE&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0pt;"&gt;&lt;span style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;                                               &lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 10pt;"&gt;END&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;),&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="font-family: Calibri; color: black; font-size: 11pt;"&gt;0, 0&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;     &lt;/span&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&lt;span style="color: black;"&gt; @Age     &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt;    Months &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Month&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@EndDate &lt;/span&gt;&lt;span style="color: navy;"&gt;-&lt;/span&gt;&lt;span style="color: black;"&gt; @Anniversary&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;-&lt;/span&gt;&lt;span style="color: black;"&gt; 1&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&lt;span style="color: black;"&gt; @Age     &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;Days&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Day&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@EndDate &lt;/span&gt;&lt;span style="color: navy;"&gt;-&lt;/span&gt;&lt;span style="color: black;"&gt; @Anniversary&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;-&lt;/span&gt;&lt;span style="color: black;"&gt; 1&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;RETURN&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;END&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Test table-valued UDF&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt;   fnAge&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;’1956-10-23′&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt;   dbo&lt;/span&gt;&lt;span style="color: navy;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnAge&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;’1956-10-23′&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Results&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Years       Months      Days&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;52          4           1&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: Calibri; color: black; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;———-&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL date range between&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;———-&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL between dates&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;USE&lt;/span&gt;&lt;span style="color: black;"&gt; AdventureWorks&lt;/span&gt;&lt;span style="color: navy;"&gt;;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL between&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; POs&lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;COUNT&lt;/span&gt;&lt;span style="color: navy;"&gt;(*)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; Purchasing&lt;/span&gt;&lt;span style="color: navy;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;PurchaseOrderHeader&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate &lt;/span&gt;&lt;span style="color: navy;"&gt;BETWEEN&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’20040301′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;AND&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’20040315′&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Result: 108&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– BETWEEN operator is equivalent to &gt;=…AND….&lt;=&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; POs&lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;COUNT&lt;/span&gt;&lt;span style="color: navy;"&gt;(*)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; Purchasing&lt;/span&gt;&lt;span style="color: navy;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;PurchaseOrderHeader&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: navy;"&gt;BETWEEN&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’2004-03-01 00:00:00.000′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;AND&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’2004-03-15  00:00:00.000′&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/*&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Orders with OrderDates&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;’2004-03-15  00:00:01.000′  – 1 second after midnight (12:00AM)&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;’2004-03-15  00:01:00.000′  – 1 minute after midnight&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;’2004-03-15  01:00:00.000′  – 1 hour after midnight&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;are not included in the two queries above.&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– To include the entire day of 2004-03-15 use the following two solutions&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; POs&lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;COUNT&lt;/span&gt;&lt;span style="color: navy;"&gt;(*)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; Purchasing&lt;/span&gt;&lt;span style="color: navy;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;PurchaseOrderHeader&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate &lt;/span&gt;&lt;span style="color: navy;"&gt;&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’20040301′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;AND&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate &lt;/span&gt;&lt;span style="color: navy;"&gt;&lt;&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’20040316′&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: red; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL between with DATE type (SQL Server 2008)&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; POs&lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;COUNT&lt;/span&gt;&lt;span style="color: navy;"&gt;(*)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; Purchasing&lt;/span&gt;&lt;span style="color: navy;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;PurchaseOrderHeader&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;DATE&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;BETWEEN&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’20040301′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;AND&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’20040315′&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;———-&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Non-standard format conversion: 2011 December 14&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL datetime to string&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; [YYYY Month DD] &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;YEAR&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;())&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;4&lt;/span&gt;&lt;span style="color: gray;"&gt;))+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘ ‘&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: fuchsia;"&gt;DATENAME&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;MM&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;())&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘ ‘&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DAY&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;())&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: gray; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Converting datetime to YYYYMMDDHHMMSS format: 20121214172638&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;replace&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt;111&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: red;"&gt;‘/’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;”&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: fuchsia;"&gt;replace&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;(),&lt;/span&gt;&lt;span style="color: black;"&gt;108&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: red;"&gt;‘:’&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;”&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: gray; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Datetime custom format conversion to YYYY_MM_DD&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;select&lt;/span&gt;&lt;span style="color: black;"&gt; CurrentDate&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;rtrim&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;year&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;()))&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘_’&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: gray;"&gt;right(&lt;/span&gt;&lt;span style="color: red;"&gt;’0′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;rtrim&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;month&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;())),&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘_’&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: gray;"&gt;right(&lt;/span&gt;&lt;span style="color: red;"&gt;’0′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;rtrim&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;day&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;())),&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Converting seconds to HH:MM:SS format&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;declare&lt;/span&gt;&lt;span style="color: black;"&gt; @Seconds &lt;/span&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;set&lt;/span&gt;&lt;span style="color: black;"&gt; @Seconds &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; 10000&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;select&lt;/span&gt;&lt;span style="color: black;"&gt; TimeSpan&lt;/span&gt;&lt;span style="color: gray;"&gt;=right(&lt;/span&gt;&lt;span style="color: red;"&gt;’0′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;rtrim&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@Seconds &lt;/span&gt;&lt;span style="color: gray;"&gt;/&lt;/span&gt;&lt;span style="color: black;"&gt; 3600&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘:’&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: gray;"&gt;right(&lt;/span&gt;&lt;span style="color: red;"&gt;’0′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;rtrim&lt;/span&gt;&lt;span style="color: gray;"&gt;((&lt;/span&gt;&lt;span style="color: black;"&gt;@Seconds &lt;/span&gt;&lt;span style="color: gray;"&gt;%&lt;/span&gt;&lt;span style="color: black;"&gt; 3600&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;/&lt;/span&gt;&lt;span style="color: black;"&gt; 60&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘:’&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: gray;"&gt;right(&lt;/span&gt;&lt;span style="color: red;"&gt;’0′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;rtrim&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@Seconds &lt;/span&gt;&lt;span style="color: gray;"&gt;%&lt;/span&gt;&lt;span style="color: black;"&gt; 60&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Result: 02:46:40&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Test result&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;select&lt;/span&gt;&lt;span style="color: black;"&gt; 2&lt;/span&gt;&lt;span style="color: gray;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt;3600 &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; 46&lt;/span&gt;&lt;span style="color: gray;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt;60 &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; 40&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Result: 10000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Set the time portion of a datetime value to 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL strip time from date&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL strip time from datetime&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Results: 2014-01-23 05:35:52.793 2014-01-23 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/*******&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;VALID DATE RANGES FOR DATE/DATETIME DATA TYPES&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;SMALLDATETIME date range:&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;January 1, 1900 through June 6, 2079&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;DATETIME date range:&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;January 1, 1753 through December 31, 9999&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;DATETIME2 date range (SQL Server 2008):&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;January 1,1 AD through December 31, 9999 AD&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;DATE date range (SQL Server 2008):&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;January 1, 1 AD through December 31, 9999 AD&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*******/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Selecting with CONVERT into different styles&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Note: Only Japan &amp;amp; ISO styles can be used in ORDER BY&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;TOP&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;     Italy  &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 105&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;   &lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; USA    &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 110&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;   &lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; Japan  &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 111&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;   &lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; ISO    &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 112&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; AdventureWorks&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;Purchasing&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;PurchaseOrderHeader&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;ORDER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;BY&lt;/span&gt;&lt;span style="color: black;"&gt; PurchaseOrderID &lt;/span&gt;&lt;span style="color: blue;"&gt;DESC&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Results&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Italy       USA         Japan       ISO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;25-07-2004  07-25-2004  2004/07/25  20040725&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server convert date to integer&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt; @Datetime &lt;/span&gt;&lt;span style="color: blue;"&gt;datetime&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @Datetime &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’2012-10-23 10:21:05.345′&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; DateAsInteger &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@Datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;112&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;as&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Result: 20121023&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server convert integer to datetime&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt; @intDate &lt;/span&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @intDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; 20120315&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; IntegerToDatetime &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@intDate &lt;/span&gt;&lt;span style="color: blue;"&gt;as&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;as&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Result: 2012-03-15 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server CONVERT script applying table INSERT/UPDATE&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server convert date&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Datetime column is converted into date only string column&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;USE&lt;/span&gt;&lt;span style="color: black;"&gt; tempdb&lt;/span&gt;&lt;span style="color: gray;"&gt;;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;CREATE&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;TABLE&lt;/span&gt;&lt;span style="color: black;"&gt; sqlConvertDateTime&lt;/span&gt;&lt;span style="color: blue;"&gt;   &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;            DatetimeCol &lt;/span&gt;&lt;span style="color: blue;"&gt;datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;            DateCol &lt;/span&gt;&lt;span style="color: blue;"&gt;char&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;8&lt;/span&gt;&lt;span style="color: gray;"&gt;));&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;INSERT&lt;/span&gt;&lt;span style="color: black;"&gt; sqlConvertDateTime&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DatetimeCol&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;()&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: gray; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&lt;span style="color: black;"&gt; sqlConvertDateTime&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; DateCol &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;char&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;10&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; DatetimeCol&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 112&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; sqlConvertDateTime&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server convert datetime&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– The string date column is converted into datetime column&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&lt;span style="color: black;"&gt; sqlConvertDateTime&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; DatetimeCol &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;Datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; DateCol&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 112&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; sqlConvertDateTime&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Adding a day to the converted datetime column with DATEADD&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&lt;span style="color: black;"&gt; sqlConvertDateTime&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; DatetimeCol &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;day&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;Datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; DateCol&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 112&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; sqlConvertDateTime&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Equivalent formulation&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server cast datetime&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&lt;span style="color: black;"&gt; sqlConvertDateTime&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; DatetimeCol &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DateCol &lt;/span&gt;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; sqlConvertDateTime&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;DROP&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;TABLE&lt;/span&gt;&lt;span style="color: black;"&gt; sqlConvertDateTime&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* First results&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;DatetimeCol                   DateCol&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;2014-12-25 16:04:15.373       20141225 */&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Second results:&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;DatetimeCol                   DateCol&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;2014-12-25 00:00:00.000       20141225  */&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Third results:&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;DatetimeCol                   DateCol&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;2014-12-26 00:00:00.000       20141225  */&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL month sequence – SQL date sequence generation with table variable&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server cast string to datetime – SQL Server cast datetime to string&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server insert default values method&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt; @Sequence &lt;/span&gt;&lt;span style="color: blue;"&gt;table &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;Sequence &lt;/span&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;identity&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt; @i &lt;/span&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt;&lt;span style="color: gray;"&gt;;&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @i &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt; @StartDate &lt;/span&gt;&lt;span style="color: blue;"&gt;datetime&lt;/span&gt;&lt;span style="color: gray;"&gt;;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @StartDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;year&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;()))+&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                 &lt;/span&gt;&lt;span style="color: gray;"&gt;RIGHT(&lt;/span&gt;&lt;span style="color: red;"&gt;’0′&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;month&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;())),&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’01′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;WHILE &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt; @i &lt;/span&gt;&lt;span style="color: gray;"&gt;&lt;&lt;/span&gt;&lt;span style="color: black;"&gt; 120&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;BEGIN&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;INSERT&lt;/span&gt;&lt;span style="color: black;"&gt; @Sequence &lt;/span&gt;&lt;span style="color: blue;"&gt;DEFAULT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;VALUES&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @i &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; @i &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; 1&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;END&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; MonthSequence &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;month&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; Sequence&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@StartDate&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; @Sequence&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Partial results:&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;MonthSequence&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Jan  1 2012 12:00AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Feb  1 2012 12:00AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Mar  1 2012 12:00AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Apr  1 2012 12:00AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: Calibri; color: black; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server Server datetime internal storage&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server datetime formats&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server datetime to hex&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;Now&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; HexNow&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CURRENT_TIMESTAMP&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;BINARY&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;8&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Results&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Now                     HexNow&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;2009-01-02 17:35:59.297 0x00009B850122092D&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server date part – left 4 bytes – Days since 1900-01-01&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;Now&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DAY&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 0x00009B85&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’19000101′&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Result: 2009-01-02 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL time part – right 4 bytes – milliseconds since midnight&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– 1000/300 is an adjustment factor&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL dateadd to Midnight&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;Now&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;MS&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;1000.0&lt;/span&gt;&lt;span style="color: gray;"&gt;/&lt;/span&gt;&lt;span style="color: black;"&gt;300&lt;/span&gt;&lt;span style="color: gray;"&gt;)*&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;BIGINT&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 0x0122092D&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’2009-01-02′&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Result: 2009-01-02 17:35:59.290&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– String date and datetime date&amp;amp;time columns usage&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server datetime formats in tables&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;USE&lt;/span&gt;&lt;span style="color: black;"&gt; tempdb&lt;/span&gt;&lt;span style="color: gray;"&gt;;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;NOCOUNT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;ON&lt;/span&gt;&lt;span style="color: gray;"&gt;;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server select into table create&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;TOP &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;5&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      FullName&lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;nvarchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;50&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt;FirstName&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: red;"&gt;‘ ‘&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt;LastName&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      BirthDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;char&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;8&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; BirthDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;112&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      ModifiedDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;()&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;INTO&lt;/span&gt;&lt;span style="color: black;"&gt; Employee&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; AdventureWorks&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;HumanResources&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;Employee e&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: gray;"&gt;INNER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;JOIN&lt;/span&gt;&lt;span style="color: black;"&gt; AdventureWorks&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;Person&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;Contact c&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt 0pt 0pt 0.375in;"&gt;&lt;span style="color: blue;"&gt;ON&lt;/span&gt;&lt;span style="color: black;"&gt; c&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;ContactID &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; e&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;ContactID&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;ORDER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;BY&lt;/span&gt;&lt;span style="color: black;"&gt; EmployeeID&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server alter table&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;ALTER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;TABLE&lt;/span&gt;&lt;span style="color: black;"&gt; Employee &lt;/span&gt;&lt;span style="color: blue;"&gt;ALTER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;COLUMN&lt;/span&gt;&lt;span style="color: black;"&gt; FullName &lt;/span&gt;&lt;span style="color: blue;"&gt;nvarchar&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;50&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;NOT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;NULL&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;ALTER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;TABLE&lt;/span&gt;&lt;span style="color: black;"&gt; Employee&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt 0pt 0pt 0.75in;"&gt;&lt;span style="color: blue;"&gt;ADD&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;CONSTRAINT&lt;/span&gt;&lt;span style="color: black;"&gt; [PK_Employee] &lt;/span&gt;&lt;span style="color: blue;"&gt;PRIMARY&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;KEY &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;FullName &lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Results&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Table definition for the Employee table&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Note: BirthDate is string date (only)&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;CREATE TABLE dbo.Employee(&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;      FullName nvarchar(50) NOT NULL PRIMARY KEY,&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;      BirthDate char(8) NULL,&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;      ModifiedDate datetime NOT NULL&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;      )&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; Employee &lt;/span&gt;&lt;span style="color: blue;"&gt;ORDER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;BY&lt;/span&gt;&lt;span style="color: black;"&gt; FullName&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Results&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;FullName                BirthDate   ModifiedDate&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Guy Gilbert             19720515    2009-01-03 10:10:19.217&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Kevin Brown             19770603    2009-01-03 10:10:19.217&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Rob Walters             19650123    2009-01-03 10:10:19.217&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Roberto Tamburello      19641213    2009-01-03 10:10:19.217&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Thierry D’Hers          19490829    2009-01-03 10:10:19.217&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server age&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; FullName&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; Age &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;YEAR&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; BirthDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;GETDATE&lt;/span&gt;&lt;span style="color: gray;"&gt;()),&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;       RowMaintenanceDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;ModifiedDate &lt;/span&gt;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; Employee &lt;/span&gt;&lt;span style="color: blue;"&gt;ORDER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;BY&lt;/span&gt;&lt;span style="color: black;"&gt; FullName&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Results&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;FullName                Age   RowMaintenanceDate&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Guy Gilbert             37    Jan  3 2009 10:10AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Kevin Brown             32    Jan  3 2009 10:10AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Rob Walters             44    Jan  3 2009 10:10AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Roberto Tamburello      45    Jan  3 2009 10:10AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Thierry D’Hers          60    Jan  3 2009 10:10AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server age of Rob Walters on specific dates&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server string to datetime implicit conversion with DATEADD&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; AGE50DATE &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;YY&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 50&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’19650123′&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Result: 2015-01-23 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server datetime to string, Italian format for ModifiedDate&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server string to datetime implicit conversion with DATEDIFF&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; FullName&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;         AgeDEC31 &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;YEAR&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; BirthDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’20141231′&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;         AgeJAN01 &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;YEAR&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; BirthDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’20150101′&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;         AgeJAN23 &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;YEAR&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; BirthDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’20150123′&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;         AgeJAN24 &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;YEAR&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; BirthDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’20150124′&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;       ModDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; ModifiedDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 105&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; Employee&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; FullName &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘Rob Walters’&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;ORDER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;BY&lt;/span&gt;&lt;span style="color: black;"&gt; FullName&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Results&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Important Note: age increments on Jan 1 (not as commonly calculated)&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;FullName    AgeDEC31    AgeJAN01    AgeJAN23    AgeJAN24    ModDate&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;Rob Walters 49          50          50          50          03-01-2009&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: Calibri; color: green; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL combine integer date &amp;amp; time into datetime&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Datetime format sql&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL stuff&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt; @DateTimeAsINT &lt;/span&gt;&lt;span style="color: blue;"&gt;TABLE &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt; ID &lt;/span&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;identity&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;primary&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;key&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;   DateAsINT &lt;/span&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;   TimeAsINT &lt;/span&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: green;"&gt;– NOTE: leading zeroes in time is for readability only! &lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;INSERT&lt;/span&gt;&lt;span style="color: black;"&gt; @DateTimeAsINT&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DateAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; TimeAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;VALUES &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;20121023&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 235959&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;INSERT&lt;/span&gt;&lt;span style="color: black;"&gt; @DateTimeAsINT&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DateAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; TimeAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;VALUES &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;20121023&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 010204&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;INSERT&lt;/span&gt;&lt;span style="color: black;"&gt; @DateTimeAsINT&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DateAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; TimeAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;VALUES &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;20121023&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 002350&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;INSERT&lt;/span&gt;&lt;span style="color: black;"&gt; @DateTimeAsINT&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DateAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; TimeAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;VALUES &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;20121023&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 000244&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;INSERT&lt;/span&gt;&lt;span style="color: black;"&gt; @DateTimeAsINT&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DateAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; TimeAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;VALUES &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;20121023&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 000050&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;INSERT&lt;/span&gt;&lt;span style="color: black;"&gt; @DateTimeAsINT&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DateAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; TimeAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;VALUES &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;20121023&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 000006&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; DateAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; TimeAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;datetime&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;8&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; DateAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘ ‘&lt;/span&gt;&lt;span style="color: navy;"&gt;+&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;STUFF&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;STUFF&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;RIGHT(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;REPLICATE&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;’0′&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 6&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;6&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; TimeAsINT&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; 6&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                  3&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘:’&lt;/span&gt;&lt;span style="color: navy;"&gt;),&lt;/span&gt;&lt;span style="color: black;"&gt; 6&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; 0&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘:’&lt;/span&gt;&lt;span style="color: navy;"&gt;))&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;&lt;span style="color: black;"&gt; DateTimeValue&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt;   @DateTimeAsINT &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;ORDER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;BY&lt;/span&gt;&lt;span style="color: black;"&gt; ID&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Results&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;DateAsINT   TimeAsINT   DateTimeValue&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;20121023    235959      2012-10-23 23:59:59.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;20121023    10204       2012-10-23 01:02:04.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;20121023    2350        2012-10-23 00:23:50.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;20121023    244         2012-10-23 00:02:44.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;20121023    50          2012-10-23 00:00:50.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;20121023    6           2012-10-23 00:00:06.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: Calibri; color: green; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server string to datetime, implicit conversion with assignment&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&lt;span style="color: black;"&gt; Employee &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; ModifiedDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’20150123′&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; FullName &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘Rob Walters’&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; ModifiedDate &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; Employee &lt;/span&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; FullName &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘Rob Walters’&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Result: 2015-01-23 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* SQL string date, assemble string date from datetime parts  */&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server cast string to datetime – sql convert string date&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server number to varchar conversion&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server leading zeroes for month and day&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Server right string function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&lt;span style="color: black;"&gt; Employee &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; BirthDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;char&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;4&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;YEAR&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;’1965-01-23′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;as&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;span style="color: gray;"&gt;)))+&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      &lt;/span&gt;&lt;span style="color: gray;"&gt;RIGHT(&lt;/span&gt;&lt;span style="color: red;"&gt;’0′&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;MONTH&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;’1965-01-23′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;as&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;span style="color: gray;"&gt;))),&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;)+&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      &lt;/span&gt;&lt;span style="color: gray;"&gt;RIGHT(&lt;/span&gt;&lt;span style="color: red;"&gt;’0′&lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CONVERT&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DAY&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: red;"&gt;’1965-01-23′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;as&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;span style="color: gray;"&gt;))),&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      &lt;/span&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; FullName &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘Rob Walters’&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; BirthDate &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; Employee &lt;/span&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; FullName &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘Rob Walters’&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Result: 19650123&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Perform cleanup action&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;DROP&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;TABLE&lt;/span&gt;&lt;span style="color: black;"&gt; Employee&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL nocount&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;NOCOUNT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;OFF&lt;/span&gt;&lt;span style="color: gray;"&gt;;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– sql isdate function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;USE&lt;/span&gt;&lt;span style="color: black;"&gt; tempdb&lt;/span&gt;&lt;span style="color: navy;"&gt;;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– sql newid – random sort&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;top&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;3&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; SalesOrderID&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;stringOrderDate &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;OrderDate &lt;/span&gt;&lt;span style="color: blue;"&gt;AS&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;INTO&lt;/span&gt;&lt;span style="color: black;"&gt; DateValidation&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; AdventureWorks&lt;/span&gt;&lt;span style="color: navy;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;Sales&lt;/span&gt;&lt;span style="color: navy;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;SalesOrderHeader&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;ORDER&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;BY&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;NEWID&lt;/span&gt;&lt;span style="color: navy;"&gt;()&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; DateValidation&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Results&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;SalesOrderID      stringOrderDate&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;56720             Oct 26 2003 12:00AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;73737             Jun 25 2004 12:00AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;70573             May 14 2004 12:00AM&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL update with top&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;UPDATE&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;TOP&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; DateValidation&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; stringOrderDate &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘Apb 29 2004 12:00AM’&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL string to datetime fails without validation&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; SalesOrderID&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;stringOrderDate &lt;/span&gt;&lt;span style="color: blue;"&gt;as&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;datetime&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; DateValidation&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Msg 242, Level 16, State 3, Line 1&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;The conversion of a varchar data type to a datetime data type resulted in an&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;out-of-range value.&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– sql isdate – filter for valid dates&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; SalesOrderID&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; OrderDate &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;CAST&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;stringOrderDate &lt;/span&gt;&lt;span style="color: blue;"&gt;as&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;datetime&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; DateValidation&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;ISDATE&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;stringOrderDate&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; 1&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Results&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;SalesOrderID      OrderDate&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;73737             2004-06-25 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;70573             2004-05-14 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL drop table&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;DROP&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;TABLE&lt;/span&gt;&lt;span style="color: black;"&gt; DateValidation&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;Go&lt;/p&gt; &lt;p style="font-family: Calibri; color: black; font-size: 11pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SELECT between two specified dates – assumption TIME part is 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL datetime between&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL select between two dates&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; EmployeeID&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt; RateChangeDate&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;FROM&lt;/span&gt;&lt;span style="color: black;"&gt; AdventureWorks&lt;/span&gt;&lt;span style="color: navy;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;HumanResources&lt;/span&gt;&lt;span style="color: navy;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;EmployeePayHistory&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;WHERE&lt;/span&gt;&lt;span style="color: black;"&gt; RateChangeDate &lt;/span&gt;&lt;span style="color: navy;"&gt;&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’1997-11-01′&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: navy;"&gt;AND&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;      RateChangeDate &lt;/span&gt;&lt;span style="color: navy;"&gt;&lt;&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;dd&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;’1998-01-05′&lt;/span&gt;&lt;span style="color: navy;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Results&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;EmployeeID  RateChangeDate&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;3           1997-12-12 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;4           1998-01-05 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;/* Equivalent to&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL datetime range&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;SELECT EmployeeID, RateChangeDate&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;FROM AdventureWorks.HumanResources.EmployeePayHistory&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;WHERE RateChangeDate &gt;= ’1997-11-01 00:00:00′ AND &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;      RateChangeDate &lt;  ’1998-01-06 00:00:00′&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;*/&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL datetime language setting&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL Nondeterministic function usage – result varies with language settings&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;LANGUAGE&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: red;"&gt;‘us_english’&lt;/span&gt;&lt;span style="color: navy;"&gt;;&lt;/span&gt;&lt;span style="color: black;"&gt;  –– Jan 12 2015 12&lt;/span&gt;&lt;span style="color: navy;"&gt;:&lt;/span&gt;&lt;span style="color: black;"&gt;00AM &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; US &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;’01/12/2015′&lt;/span&gt;&lt;span style="color: navy;"&gt;));&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;LANGUAGE&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: red;"&gt;‘British’&lt;/span&gt;&lt;span style="color: navy;"&gt;;&lt;/span&gt;&lt;span style="color: black;"&gt;     –– &lt;/span&gt;&lt;span style="color: blue;"&gt;Dec&lt;/span&gt;&lt;span style="color: black;"&gt;  1 2015 12&lt;/span&gt;&lt;span style="color: navy;"&gt;:&lt;/span&gt;&lt;span style="color: black;"&gt;00AM &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; UK &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;’01/12/2015′&lt;/span&gt;&lt;span style="color: navy;"&gt;));&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;LANGUAGE&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: red;"&gt;‘German’&lt;/span&gt;&lt;span style="color: navy;"&gt;;&lt;/span&gt;&lt;span style="color: black;"&gt;      –– Dez  1 2015 12&lt;/span&gt;&lt;span style="color: navy;"&gt;:&lt;/span&gt;&lt;span style="color: black;"&gt;00AM &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;LANGUAGE&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: red;"&gt;‘Deutsch’&lt;/span&gt;&lt;span style="color: navy;"&gt;;&lt;/span&gt;&lt;span style="color: black;"&gt;     –– Dez  1 2015 12&lt;/span&gt;&lt;span style="color: navy;"&gt;:&lt;/span&gt;&lt;span style="color: black;"&gt;00AM &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; Germany &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;’01/12/2015′&lt;/span&gt;&lt;span style="color: navy;"&gt;));&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;LANGUAGE&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: red;"&gt;‘French’&lt;/span&gt;&lt;span style="color: navy;"&gt;;&lt;/span&gt;&lt;span style="color: black;"&gt;      –– déc  1 2015 12&lt;/span&gt;&lt;span style="color: navy;"&gt;:&lt;/span&gt;&lt;span style="color: black;"&gt;00AM &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; France &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;’01/12/2015′&lt;/span&gt;&lt;span style="color: navy;"&gt;));&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;LANGUAGE&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: red;"&gt;‘Spanish’&lt;/span&gt;&lt;span style="color: navy;"&gt;;&lt;/span&gt;&lt;span style="color: black;"&gt;     –– Dic  1 2015 12&lt;/span&gt;&lt;span style="color: navy;"&gt;:&lt;/span&gt;&lt;span style="color: black;"&gt;00AM &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; Spain &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;’01/12/2015′&lt;/span&gt;&lt;span style="color: navy;"&gt;));&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;LANGUAGE&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: red;"&gt;‘Hungarian’&lt;/span&gt;&lt;span style="color: navy;"&gt;;&lt;/span&gt;&lt;span style="color: black;"&gt;   –– jan 12 2015 12&lt;/span&gt;&lt;span style="color: navy;"&gt;:&lt;/span&gt;&lt;span style="color: black;"&gt;00AM &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; Hungary &lt;/span&gt;&lt;span style="color: navy;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: navy;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;span style="color: navy;"&gt;,&lt;/span&gt;&lt;span style="color: red;"&gt;’01/12/2015′&lt;/span&gt;&lt;span style="color: navy;"&gt;));&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;LANGUAGE&lt;/span&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: red;"&gt;‘us_english’&lt;/span&gt;&lt;span style="color: navy;"&gt;;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Function for Monday dates calculation&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;————&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;USE&lt;/span&gt;&lt;span style="color: black;"&gt; AdventureWorks2008&lt;/span&gt;&lt;span style="color: gray;"&gt;;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL user-defined function&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– SQL scalar function – UDF&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;CREATE&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;FUNCTION&lt;/span&gt;&lt;span style="color: black;"&gt; fnMondayDate&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;               &lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;@Year          &lt;/span&gt;&lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                @Month         &lt;/span&gt;&lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                @MondayOrdinal &lt;/span&gt;&lt;span style="color: blue;"&gt;INT&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;RETURNS&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;DATETIME&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: blue; font-size: 10pt; margin: 0pt;"&gt;AS&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;BEGIN&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;DECLARE&lt;/span&gt;&lt;span style="color: black;"&gt;  @FirstDayOfMonth &lt;/span&gt;&lt;span style="color: blue;"&gt;CHAR&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;10&lt;/span&gt;&lt;span style="color: gray;"&gt;),&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;             @SeedDate        &lt;/span&gt;&lt;span style="color: blue;"&gt;CHAR&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;10&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt;    &lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @FirstDayOfMonth &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@Year&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘-’&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;convert&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: blue;"&gt;VARCHAR&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@Month&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;+&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;‘-01′&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;SET&lt;/span&gt;&lt;span style="color: black;"&gt; @SeedDate &lt;/span&gt;&lt;span style="color: gray;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;’1900-01-01′&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt;    &lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;RETURN&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DD&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEDIFF&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DD&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;@SeedDate&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;DATEADD&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;DD&lt;/span&gt;&lt;span style="color: gray;"&gt;,(&lt;/span&gt;&lt;span style="color: black;"&gt;@MondayOrdinal &lt;/span&gt;&lt;span style="color: gray;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt; 7&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;-&lt;/span&gt;&lt;span style="color: black;"&gt; 1&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;                  @FirstDayOfMonth&lt;/span&gt;&lt;span style="color: gray;"&gt;))&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;/&lt;/span&gt;&lt;span style="color: black;"&gt; 7 &lt;/span&gt;&lt;span style="color: gray;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt; 7&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;  @SeedDate&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: blue;"&gt;END&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt;GO&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: black; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Test Datetime UDF&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– Third Monday in Feb, 2015&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnMondayDate&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: black;"&gt;2016&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;2&lt;/span&gt;&lt;span style="color: gray;"&gt;,&lt;/span&gt;&lt;span style="color: black;"&gt;3&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– 2015-02-16 00:00:00.000&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt; &lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– First Monday of current month&lt;/p&gt; &lt;p style="font-family: 'Courier New'; font-size: 10pt; margin: 0pt;"&gt;&lt;span style="color: blue;"&gt;SELECT&lt;/span&gt;&lt;span style="color: black;"&gt; dbo&lt;/span&gt;&lt;span style="color: gray;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;fnMondayDate&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Year&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;()),&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;Month&lt;/span&gt;&lt;span style="color: gray;"&gt;(&lt;/span&gt;&lt;span style="color: fuchsia;"&gt;getdate&lt;/span&gt;&lt;span style="color: gray;"&gt;()),&lt;/span&gt;&lt;span style="color: black;"&gt;1&lt;/span&gt;&lt;span style="color: gray;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: 'Courier New'; color: green; font-size: 10pt; margin: 0pt;"&gt;– 2009-02-02 00:00:00.000  &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-1548452125075135727?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/1548452125075135727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=1548452125075135727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/1548452125075135727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/1548452125075135727'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2011/01/how-to-format-datetime-and-date-in.html' title='How to format datetime and date in Microsoft SQL Server'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-5615369057295150738</id><published>2011-01-01T11:57:00.000+08:00</published><updated>2011-01-11T11:59:31.227+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Kylie Minogue'/><category scheme='http://www.blogger.com/atom/ns#' term='music'/><category scheme='http://www.blogger.com/atom/ns#' term='Lyrics'/><category scheme='http://www.blogger.com/atom/ns#' term='Higher'/><category scheme='http://www.blogger.com/atom/ns#' term='Taio Cruz'/><category scheme='http://www.blogger.com/atom/ns#' term='MTV'/><title type='text'>Higher by Taio Cruz ft. Kylie Minogue MTV &amp; Lyrics</title><content type='html'>&lt;small class="date"&gt;      &lt;span class="date_day"&gt;&lt;/span&gt;&lt;span class="date_year"&gt;&lt;/span&gt; &lt;/small&gt;&lt;img class="alignnone size-full wp-image-7147" title="Taio-Cruz-Higher-Kylie-Minogue-Hiigher-MTV-Lyrics" src="http://www.pjlighthouse.com/wp-content/uploads/2011/01/Taio-Cruz-Higher-Kylie-Minogue-Hiigher-MTV-Lyrics.jpg" alt="Taio-Cruz-Higher-Kylie-Minogue-Hiigher-MTV-Lyrics" height="350" width="410" /&gt;   check out this hot song from&lt;strong&gt; Taio Cruz&lt;/strong&gt; featuring &lt;strong&gt;Kylie Minogue&lt;/strong&gt; in “&lt;strong&gt;Higher&lt;/strong&gt;“. view music video here &gt;&gt;&lt;br /&gt;&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2010/12/music-higher-taio-cruz-ft-kylie-minogue-mtv-lyrics/" rel="bookmark" title="Read Music: Higher – Taio Cruz ft. Kylie Minogue MTV &amp;amp; Lyrics"&gt;Music: Higher – Taio Cruz ft. Kylie Minogue MTV &amp;amp; Lyrics&lt;/a&gt;&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-5615369057295150738?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/5615369057295150738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=5615369057295150738' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5615369057295150738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5615369057295150738'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2011/01/higher-by-taio-cruz-ft-kylie-minogue.html' title='Higher by Taio Cruz ft. Kylie Minogue MTV &amp; Lyrics'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-5434324912605136017</id><published>2010-12-10T11:49:00.002+08:00</published><updated>2010-12-30T16:21:04.165+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lol'/><category scheme='http://www.blogger.com/atom/ns#' term='just for fun'/><category scheme='http://www.blogger.com/atom/ns#' term='funny joke'/><category scheme='http://www.blogger.com/atom/ns#' term='Potential Company Mergers'/><title type='text'>Potential Company Mergers</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Xerox and Wurlitzer&lt;/span&gt;: They're going to make reproductive organs&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Fairchild Electronics and Honeywell Computers&lt;/span&gt;: New company will be called Fairwell Honeychild&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3M and Goodyear&lt;/span&gt;: New company  will be called mmmGood&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Polygram records, Warner Brothers and Keebler&lt;/span&gt;: new company will be called Poly Warner Cracker&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;W.R. Grace Co., Fuller Brush Co., Mary Kay Cosmetics and Hale Business Systems&lt;/span&gt;: New company will be called Hale Mary Fuller Grace&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;John Deere and Abitibi-Price&lt;/span&gt;: new company will be called Deere Abi&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Honeywell, Imasco, and Home Oil&lt;/span&gt;: New company will be called Honey I'm Home&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Denison Mines, Alliance and Metal Mining&lt;/span&gt;: New company will be called Mine, All Mine&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3M, J.C. Penney and Canadian Opera Company&lt;/span&gt;: New company will be called 3 Penney Opera&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Knott's Berry Farm and National organization of Women&lt;/span&gt;: New company will be called Knott NOW!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Zippo Manufacturing, Audi, Dofasco, and Dakota Mining&lt;/span&gt;: New company will be called Zip Audi Do-Da&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-5434324912605136017?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/5434324912605136017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=5434324912605136017' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5434324912605136017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5434324912605136017'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2010/12/potential-company-mergers.html' title='Potential Company Mergers'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-643490434791893178</id><published>2010-07-10T18:12:00.000+08:00</published><updated>2010-07-20T18:15:14.350+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Iphone Applegirl'/><category scheme='http://www.blogger.com/atom/ns#' term='Drummer Girl'/><category scheme='http://www.blogger.com/atom/ns#' term='vs'/><category scheme='http://www.blogger.com/atom/ns#' term='Battle'/><category scheme='http://www.blogger.com/atom/ns#' term='Poker Face'/><category scheme='http://www.blogger.com/atom/ns#' term='Lady Gaga'/><title type='text'>Iphone Applegirl vs Drummer Girl - Poker Face Battle!</title><content type='html'>&lt;p&gt;&lt;img src="http://pjlighthouse.com/wordpress/wp-content/uploads/2010/07/applegirl-vs-drummergirl-poker-face-battle.jpg" alt="YouTube: Poker Face Battle - Iphone Girl vs Drummer Girl" /&gt; Check this  &lt;strong&gt;Poker Face Battle &lt;/strong&gt;!! who do you  think win &lt;strong&gt;&lt;/strong&gt;?&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Iphone Applegirl &lt;/strong&gt;vs &lt;strong&gt;Drummer Girl&lt;/strong&gt; :) Watch and be amazed!!&lt;/p&gt; &lt;p&gt; &lt;a href="http://pjlighthouse.com/wordpress/2010/07/10/youtube-poker-face-battle-iphone-applegirl-vs-drummer-girl/" class="more-link"&gt;Click Here to Continue Reading..&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-643490434791893178?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/643490434791893178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=643490434791893178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/643490434791893178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/643490434791893178'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2010/07/iphone-applegirl-vs-drummer-girl-poker.html' title='Iphone Applegirl vs Drummer Girl - Poker Face Battle!'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-727626586153266285</id><published>2010-02-25T11:28:00.005+08:00</published><updated>2010-03-08T13:13:12.208+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lousy web hosting'/><category scheme='http://www.blogger.com/atom/ns#' term='on the move'/><category scheme='http://www.blogger.com/atom/ns#' term='moving'/><category scheme='http://www.blogger.com/atom/ns#' term='godaddy.com sucks'/><category scheme='http://www.blogger.com/atom/ns#' term='pjlighthouse.com'/><category scheme='http://www.blogger.com/atom/ns#' term='godaddy suck'/><title type='text'>PJLightHouse.com is on the move...</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_cCmvObyemK4/S4XvIo-k7CI/AAAAAAAAAhc/twpUuYJ42Ac/s1600-h/pjlighthouse-moving-out-from-godaddy-hosting.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 280px;" src="http://2.bp.blogspot.com/_cCmvObyemK4/S4XvIo-k7CI/AAAAAAAAAhc/twpUuYJ42Ac/s320/pjlighthouse-moving-out-from-godaddy-hosting.jpg" alt="" id="BLOGGER_PHOTO_ID_5442018656464989218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;hi guys, if you are looking for &lt;span style="font-weight: bold;"&gt;pjlighthouse.com &lt;/span&gt;, sorry to inform you that it will be down temporarily due to some problem with godaddy hosting. Please be patient at the moment till I can get things sorted out. In meantime you can visit the backup of some post &lt;a href="http://www.pjlighthouse.com/wordpress"&gt;here&lt;/a&gt;. You can leave a comment or feedback if you need any info. Thanks !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-727626586153266285?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/727626586153266285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=727626586153266285' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/727626586153266285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/727626586153266285'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2010/02/pjlighthousecom-is-on-move.html' title='PJLightHouse.com is on the move...'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_cCmvObyemK4/S4XvIo-k7CI/AAAAAAAAAhc/twpUuYJ42Ac/s72-c/pjlighthouse-moving-out-from-godaddy-hosting.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-227038527360286604</id><published>2010-02-25T10:36:00.005+08:00</published><updated>2010-02-25T10:55:18.930+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eBay.com'/><category scheme='http://www.blogger.com/atom/ns#' term='Cash Back'/><category scheme='http://www.blogger.com/atom/ns#' term='ebay'/><category scheme='http://www.blogger.com/atom/ns#' term='paypal'/><category scheme='http://www.blogger.com/atom/ns#' term='eBay.ca'/><category scheme='http://www.blogger.com/atom/ns#' term='Promo Codes'/><category scheme='http://www.blogger.com/atom/ns#' term='eBay.co.uk'/><category scheme='http://www.blogger.com/atom/ns#' term='PayPal Discount Coupon'/><category scheme='http://www.blogger.com/atom/ns#' term='Rebates'/><title type='text'>FREE E-bay Paypal MoneySaving Promo Codes Discount Coupons</title><content type='html'>&lt;p&gt;&lt;a href="http://www.bigcrumbs.com/crumbs/landing.do?r=maverickchen&amp;amp;s=5724" target="_blank" title="BiGcrumbs Saver eBay, Paypal Coupon" onclick="javascript:urchinTracker ('/outbound/article/www.bigcrumbs.com');"&gt;&lt;img src="http://ebay-paypal-discount-coupon-gi.textmalaysia.com/upload_files/286/466/7422/BigCrumbs.comPayPalEBaySaveMoneyEbayDiscount.jpg" border="0" /&gt;Here's a method that can help you save&lt;/a&gt;&lt;span style="line-height: normal;font-size:21px;" &gt;&lt;a href="http://www.bigcrumbs.com/crumbs/landing.do?r=maverickchen&amp;amp;s=5724" target="_blank" title="BiGcrumbs Saver eBay, Paypal Coupon"&gt; money&lt;/a&gt; (about 3% OFF) when you purchase on eBay.com, eBay.ca and eBay.co.uk!&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Get up to 3% off cash back on any products purchased &lt;strong&gt;(Auctions or Buy it now&lt;/strong&gt;) on &lt;strong&gt;eBay.com, eBay.ca &amp;amp; eBay.co.uk&lt;/strong&gt; - The world’s most popular online store!&lt;/p&gt;&lt;p&gt; &lt;/p&gt; &lt;p&gt;&lt;span style="line-height: normal;font-size:25px;" &gt;&lt;span style="color: rgb(255, 0, 16);"&gt;&lt;strong&gt;No Minimum Purchase Required!&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Fast email reply on any questions. Feel free to contact us on any questions so we can build up trust! Full Refund if you are not satisfied!&lt;/p&gt; &lt;ul&gt;&lt;li&gt;There is NO minimum purchase required&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;Use it online at eBay.com, eBay.ca &amp;amp; eBay.co.uk&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;There is no limit on how many times you can use this discount&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;Read this before you purchase on eBay. Otherwise you will not get the discount!&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;The discount will be paid as cash back. Like a rebate.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;This is NOT eBay coupon and it is stackable with eBay coupon if eBay send you one. (eBay coupon is not transferrable. You can only use eBay coupon if eBay sends you the coupon code.)&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;A great potential to earn residual income!&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;It’s so Simple…&lt;strong&gt;  Here’s how: &lt;a href="http://www.bigcrumbs.com/crumbs/landing.do?r=maverickchen&amp;amp;s=57248" target="_blank"&gt;Join FREE and start earning cash back today!&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt; &lt;img src="http://maverickchen.textmalaysia.com/upload_files/286/368/7417/ebaybigCrumbs.jpg" border="0" /&gt;&lt;/p&gt; &lt;p&gt;Read more details  here &gt;&gt;&lt;a href="http://ebay-paypal-discount-coupon.blogspot.com/" title="Read BigCrumbs.com PayPal Discount Coupon, Rebates for eBay.com, eBay.ca &amp;amp; eBay.co.uk"&gt; &lt;strong&gt;BigCrumbs.com PayPal Discount Coupon, Rebates for eBay.com, eBay.ca &amp;amp; eBay.co.uk&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;h2 class="title"&gt;Join PayPal for FREE&lt;/h2&gt; &lt;p&gt;&lt;!-- Begin PayPal Logo --&gt;&lt;a href="https://www.paypal.com/row/mrb/pal=KUJPTQ5MSKXTN" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.paypal.com');"&gt;&lt;img src="http://images.paypal.com/en_US/i/bnr/paypal_mrb_banner.gif" alt="Sign up for PayPal and start accepting credit card payments instantly." border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-227038527360286604?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/227038527360286604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=227038527360286604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/227038527360286604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/227038527360286604'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2010/02/free-e-bay-paypal-moneysaving-promo.html' title='FREE E-bay Paypal MoneySaving Promo Codes Discount Coupons'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-9018514769308541316</id><published>2010-02-15T14:34:00.001+08:00</published><updated>2010-02-25T14:48:04.614+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='search enghttp://www.blogger.com/img/blank.gifine optimization'/><category scheme='http://www.blogger.com/atom/ns#' term='top 10'/><category scheme='http://www.blogger.com/atom/ns#' term='SEO'/><category scheme='http://www.blogger.com/atom/ns#' term='seo ranking'/><category scheme='http://www.blogger.com/atom/ns#' term='google SEO'/><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><category scheme='http://www.blogger.com/atom/ns#' term='goodle.com'/><title type='text'>Top Ten Google SEO Ranking Factors</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_cCmvObyemK4/S4YdFDM673I/AAAAAAAAAhk/8NyQsZ3Rnk4/s1600-h/SEO-services-top10-ranking.GIF"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 220px; height: 170px;" src="http://3.bp.blogspot.com/_cCmvObyemK4/S4YdFDM673I/AAAAAAAAAhk/8NyQsZ3Rnk4/s320/SEO-services-top10-ranking.GIF" alt="" id="BLOGGER_PHOTO_ID_5442069172319874930" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h4 style="font-weight: normal;"&gt;&lt;p&gt;People don’t really understand that there are many different factors that fall into place when determining where a website ranks in the Google search engine results. Some things to keep in mind when you are wondering why your site doesn’t rank well. It is not always just the obvious reasons that are holding it back.&lt;br /&gt;&lt;br /&gt;Over the past years by reading &lt;a href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;amp;answer=35769" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.google.com');"&gt;Google’s Webmaster Guidelines&lt;/a&gt;, &lt;a href="http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.google.com');"&gt;Google SEO Starter Guide&lt;/a&gt;, many other industry blogs and by actually doing professional SEO and internet marketing since the late 1990’s, I have gathered data and come to a boiled down short list of the most important Google search engine ranking factors.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;Here is the list of my top 10 of important Google SEO ranking factors to consider:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1.  Age of Domain:&lt;/strong&gt; Age of URL is very important. If you just bought your domain a few weeks or even months ago you have a long road ahead of you. The reality is the age of your website helps build trust. If your website has been online for several years, chances are you have an established business.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2.  Domain Hosting:&lt;/strong&gt; Where is your site hosted? Find out through your hosting company what continent or country your site is hosted in. This can often times play a large role in search rankings. Always use a reputable hosting company. If your company is US based then use a hosting company in the United States. Also, I always recommend a dedicated IP when you can. There are virtual dedicated and cloud hosting solutions that are more affordable. Never use the cheapest hosting. The reality is, if you cannot afford hosting you should re-consider the business…I know this is harsh but very true. :) &lt;/p&gt; &lt;p&gt;&lt;strong&gt;3.  Your Neighbors: &lt;/strong&gt;If you have a virtual server, which sites like Godaddy usually are have been known to house hundreds of websites on one server. Make sure that your neighbors on your server are not classified as spam.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;4.  URL Structure: &lt;/strong&gt;Make sure your URL structures are very clean. There should not be any random strings of characters at the end of your URL’s. This is part of the onsite search engine optimization process as well.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;5.  Content: &lt;/strong&gt;Content is very important. To start make sure you have text on all your important pages, then make sure it is good text consisting of your targeted keywords spread throughout naturally. Simply put, ALWAYS write your content for humans, your website visitors first and NEVER write content for the solo purpose to achieve Google search engine rankings. Chances are the content will not be user focused or provide value to your visitors.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;6.  Internal Link Structure:&lt;/strong&gt; Make sure your inner pages are linked correctly. Visitors should have easy made pathways connecting to your other pages from every page of your website. Make sure the code of your website is verified and keep flash and JavaScript to a minimum, if you can. Essentially make sure the site is clean, easy to use and interlinked to help the user experience.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;7.  Trust:&lt;/strong&gt; Do you at least have a mailing address listed on your website? You should if you don’t. Google likes to see trust factors on websites so anything you can add that could help build trust for your audience will benefit your rankings. I always recommend having a phone number on each page of your website. Make it easy for people to do business with you, it all starts with establishing trust and that starts with contact information on your website.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;8.  Keywords:&lt;/strong&gt; Make sure your website is optimized using your keywords. This means any alt tags for images, meta page information and existing content at the very least of things. Remember to naturally optimize your website based on the content of each page of your website.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;9.  Bounce Rate:&lt;/strong&gt; Although bounce rate might not seem important if Google sees that nobody hangs out on your website for more than a few seconds before they leave this could be a ranking problem over time. Make changes to get visitors engaged with your website. Simple things, like video, newsletter sign up, call to actions, etc will help improve your bounce rate over time. Make sure you have proper tracking on your website, such as Google analytics.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;10.  Outbound links:&lt;/strong&gt; Make sure the websites that you link to are 100% relevant to your business and industry. If you sell animals toys but you are linking to a site that sells shoes that is not very relevant and over time could really impact your rankings. Bottom line is if it makes sense to link to another site, then do so, but remember you could be sending your visitors away from your site.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;11.  Inbound Links: &lt;/strong&gt;I know this was a list of my top 10, but I felt I had to mention inbound links. The key here (speaking as a white hat SEO person), don’t buy or exchange links. Market and promote your business online to build visitors to your website over time. If you do, then the relevant links will follow!&lt;br /&gt;&lt;em&gt;&lt;br /&gt;**Note: As the Google (and yes there are 2 other major search engines!) algorithm changes there are always new ranking factors that come into play, such as the page load time and many others. I am sure when I re-do this list a year from now, there may be another one or two additional factors.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;There are many extensive factors that Google uses when determining website rankings. Very important to get these factors correct otherwise you could find yourself just spinning your wheels. The bottom line is it is all about relevancy and earning your visitors (and yes Google’s) search engine trust over time.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Source: &lt;a href="http://adjix.com/2e2w"&gt;www.searchengineoptimizationjournal.com &lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/h4&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-9018514769308541316?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/9018514769308541316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=9018514769308541316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/9018514769308541316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/9018514769308541316'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2010/02/top-ten-google-seo-ranking-factors.html' title='Top Ten Google SEO Ranking Factors'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_cCmvObyemK4/S4YdFDM673I/AAAAAAAAAhk/8NyQsZ3Rnk4/s72-c/SEO-services-top10-ranking.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-7132004008972794438</id><published>2010-01-19T01:22:00.002+08:00</published><updated>2010-01-19T01:24:30.805+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AI Map'/><category scheme='http://www.blogger.com/atom/ns#' term='DotA allstars'/><category scheme='http://www.blogger.com/atom/ns#' term='Free Download'/><category scheme='http://www.blogger.com/atom/ns#' term='Warcraft III'/><category scheme='http://www.blogger.com/atom/ns#' term='v6.64'/><title type='text'>Warcraft III  DotA All-Stars v6.64 AI Map Free Download</title><content type='html'>&lt;img src="http://maverickchen.textmalaysia.com/upload_files/286/368/7367/dota_aimap_v664_defense_of_the_ancients_kunkka_ai.jpg" border="0" /&gt;&lt;br /&gt;Best Download for &lt;strong&gt;Warcraft III  DotA All-Stars 6.64 AI Map&lt;/strong&gt;!&lt;br /&gt;Download Free AI Maps links below&lt;br /&gt;&lt;strong&gt;Warcraft III DotA v6.64 (v0.213) &lt;/strong&gt;&lt;strong&gt;Map Changelog&lt;/strong&gt;:&lt;br /&gt;-First update to v6.64&lt;br /&gt;-Changed the default AI behaviour of creeps and towers to be the same as in the official map&lt;br /&gt;-Fixed the fade on Circles of Protection belonging to other players&lt;br /&gt;-Fixed some numerical errors on Bristleback’s abilities&lt;br /&gt;-Added some additional &lt;strong&gt;AI ability &lt;/strong&gt;functionality (Black Hole, Fissure, Epicenter)Free Map download here &gt;&gt;  &lt;strong&gt;&lt;a href="http://adf.ly/1A12" target="_blank"&gt;Free Warcraft III DotA v6.64 AI Map Download &lt;/a&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-7132004008972794438?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/7132004008972794438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=7132004008972794438' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/7132004008972794438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/7132004008972794438'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2010/01/warcraft-iii-dota-all-stars-v664-ai-map.html' title='Warcraft III  DotA All-Stars v6.64 AI Map Free Download'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-5182122608901206876</id><published>2009-10-22T16:46:00.001+08:00</published><updated>2009-10-22T16:48:47.777+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cool art'/><category scheme='http://www.blogger.com/atom/ns#' term='bread art'/><category scheme='http://www.blogger.com/atom/ns#' term='Master piece'/><category scheme='http://www.blogger.com/atom/ns#' term='food art'/><category scheme='http://www.blogger.com/atom/ns#' term='Amazing'/><category scheme='http://www.blogger.com/atom/ns#' term='Creative'/><title type='text'>Amazingly Cool Bread Art at BreadArtProject.com</title><content type='html'>&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2009/10/08/art-amazing-bread-art-at-wwwbreadartprojectcom/" rel="bookmark" title="Read Art: Amazing Bread Art at www.breadartproject.com"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/h2&gt;                                                             &lt;small class="date"&gt;      &lt;span class="date_day"&gt; &lt;/span&gt; &lt;/small&gt;&lt;img alt="Bread Art, Amazing Bread Art,  breadartproject.com, Bread Project, SEO, DotA Masterpiece, Food Art" id="image5890" src="http://www.pjlighthouse.com/wp-content/uploads/2009/10/breadartproject-cool-bread-art.jpg" /&gt; Check out these very amazing&lt;span style="font-weight: bold;"&gt; Bread&lt;/span&gt;&lt;strong&gt;&lt;span&gt;Art &lt;/span&gt;&lt;/strong&gt;that I stumbled upon at &lt;span style="font-weight: bold;"&gt;www.breadartproject.com&lt;/span&gt;. The &lt;strong&gt;&lt;span&gt;&lt;span&gt;&lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;Bread ART PROJECT&lt;/span&gt;&lt;/span&gt;&lt;span style="border-bottom: 1px solid rgb(0, 153, 0); text-decoration: underline; color: rgb(0, 153, 0); font-size: 11.6667px; font-style: normal; font-family: &amp;quot;Lucida Grande&amp;quot;,&amp;quot;Lucida Sans Unicode&amp;quot;,Arial,sans-serif;" class="IL_LINK_STYLE"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt; was created by the &lt;strong&gt;Grain Foods Foundation&lt;/strong&gt; to help increase awareness of the growing &lt;strong&gt;hunger problem&lt;/strong&gt; in the United Statevery amazing!!  see more bread art here &gt;&gt;&lt;br /&gt;&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2009/10/08/art-amazing-bread-art-at-wwwbreadartprojectcom/" rel="bookmark" title="Read Art: Amazing Bread Art at www.breadartproject.com"&gt;Art: Amazing Bread Art at www.breadartproject.com&lt;/a&gt;&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-5182122608901206876?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/5182122608901206876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=5182122608901206876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5182122608901206876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5182122608901206876'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2009/10/amazingly-cool-bread-art-at.html' title='Amazingly Cool Bread Art at BreadArtProject.com'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-1804391605841155521</id><published>2009-09-22T16:49:00.000+08:00</published><updated>2009-10-22T16:52:42.496+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cool art'/><category scheme='http://www.blogger.com/atom/ns#' term='Little Baby Sculptures'/><category scheme='http://www.blogger.com/atom/ns#' term='Art'/><category scheme='http://www.blogger.com/atom/ns#' term='Amazing'/><category scheme='http://www.blogger.com/atom/ns#' term='Cool'/><title type='text'>Amazingly Cool Cute Little Baby Sculptures</title><content type='html'>&lt;img alt="Art: Cute Little Baby Sculptures" src="http://pjlighthouse.com/wordpress/wp-content/uploads/2007/11/little-baby-art-03.jpg" /&gt;&lt;span&gt; Check out some of these&lt;span style="font-weight: bold;"&gt; amazingly cute baby&lt;/span&gt; culpture &lt;/span&gt;:)  see more cute more &lt;span style="font-weight: bold;"&gt;Little Baby Sculptures&lt;/span&gt; here &gt;&gt;&lt;br /&gt;&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2007/11/12/art-amazing-cute-little-baby-sculptures/" rel="bookmark" title="Read Art: Amazing Cute Little Baby Sculptures"&gt;Amazingly Cool Cute Little Baby Sculptures&lt;/a&gt;&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-1804391605841155521?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/1804391605841155521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=1804391605841155521' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/1804391605841155521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/1804391605841155521'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2009/09/amazingly-cool-cute-little-baby.html' title='Amazingly Cool Cute Little Baby Sculptures'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-4999958381270416240</id><published>2009-06-29T04:00:00.004+08:00</published><updated>2009-06-29T04:07:21.222+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dead'/><category scheme='http://www.blogger.com/atom/ns#' term='cardiac arrest'/><category scheme='http://www.blogger.com/atom/ns#' term='wacko jacko'/><category scheme='http://www.blogger.com/atom/ns#' term='slove ad news'/><category scheme='http://www.blogger.com/atom/ns#' term='michael jackson'/><category scheme='http://www.blogger.com/atom/ns#' term='man in the mirror'/><category scheme='http://www.blogger.com/atom/ns#' term='glove one'/><category scheme='http://www.blogger.com/atom/ns#' term='crazy funny'/><title type='text'>King of Pop Michael Jackson Dead at 50</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_cCmvObyemK4/SkfNIYep3qI/AAAAAAAAAco/r0H0C1SRME4/s1600-h/digi-08.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 289px;" src="http://4.bp.blogspot.com/_cCmvObyemK4/SkfNIYep3qI/AAAAAAAAAco/r0H0C1SRME4/s320/digi-08.jpg" alt="" id="BLOGGER_PHOTO_ID_5352472226046795426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Shocking news!!!  &lt;span style="font-weight: bold;"&gt;Michael Jackson&lt;/span&gt; is dead due to &lt;span style="font-weight: bold;"&gt;cardiac arrest&lt;/span&gt; on Thursday &lt;span id="konasapn0"&gt;3:15 p.m.&lt;/span&gt; 18th June 2009. Music icon &lt;span style="font-weight: bold;"&gt;Michael Jackson&lt;/span&gt;, whose fame spanned from his childhood with the legendary &lt;span style="font-weight: bold;"&gt;Jackson 5&lt;/span&gt; to a superstar solo career that earned him the nickname ‘&lt;span style="font-weight: bold;"&gt;King of Pop&lt;/span&gt;‘ died Thursday afternoon at a &lt;span style="font-weight: bold;"&gt;Los Angeles&lt;/span&gt; hospital, a source close to the family told FOX News. He was 50 years old.&lt;br /&gt;&lt;br /&gt;Read  more here &gt;&gt; &lt;span id="konasapn0"&gt;&lt;/span&gt;&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2009/06/26/legendary-king-of-pop-michael-jackson-dead-at-50/" rel="bookmark" title="Read Legendary King of Pop Michael Jackson Dead at 50"&gt;Legendary King of Pop Michael Jackson Dead at 50&lt;/a&gt;&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-4999958381270416240?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/4999958381270416240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=4999958381270416240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/4999958381270416240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/4999958381270416240'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2009/06/king-of-pop-michael-jackson-dead-at-50.html' title='King of Pop Michael Jackson Dead at 50'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_cCmvObyemK4/SkfNIYep3qI/AAAAAAAAAco/r0H0C1SRME4/s72-c/digi-08.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-2002522283760133847</id><published>2009-05-25T14:25:00.000+08:00</published><updated>2009-05-25T14:28:30.953+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Terry Fox'/><category scheme='http://www.blogger.com/atom/ns#' term='marathon'/><category scheme='http://www.blogger.com/atom/ns#' term='canada'/><category scheme='http://www.blogger.com/atom/ns#' term='hope'/><category scheme='http://www.blogger.com/atom/ns#' term='Terry Fox Run'/><category scheme='http://www.blogger.com/atom/ns#' term='pneumonia'/><category scheme='http://www.blogger.com/atom/ns#' term='malaysia'/><title type='text'>Terry Fox Run - Never Give Up on a Dream</title><content type='html'>&lt;embed id="VideoPlayback" src="http://video.google.com/googleplayer.swf?docid=2327492518783505290&amp;hl=en&amp;fs=true" style="width:400px;height:326px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"&gt; &lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;Tribute music video to &lt;span style="font-weight:bold;"&gt;Terry Fox&lt;/span&gt; who attempted to run across &lt;span style="font-weight:bold;"&gt;Canada&lt;/span&gt; on one leg, a victim of cancer. Terry died before completing his run. &lt;br /&gt;&lt;br /&gt;In June 1981,&lt;span style="font-weight:bold;"&gt; Terry&lt;/span&gt; developed pneumonia, and on June 27, he went into a coma. He died on the 28th at 4:35 a.m., which was his favourite hour of running, a year after his legendary run, and exactly one month shy of his twenty-third birthday.&lt;br /&gt;&lt;br /&gt;Song is by Rod Stewart, which was written and recorded as a tribute to Terry. Videos obtained from CBC web archives. Images of cancer patients obtained through Google image searches&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-2002522283760133847?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/2002522283760133847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=2002522283760133847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/2002522283760133847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/2002522283760133847'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2009/05/terry-fox-run-never-give-up-on-dream.html' title='Terry Fox Run - Never Give Up on a Dream'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-5694843023438448125</id><published>2009-05-25T14:14:00.000+08:00</published><updated>2009-05-25T14:23:14.848+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Terry Fox'/><category scheme='http://www.blogger.com/atom/ns#' term='Cancer'/><category scheme='http://www.blogger.com/atom/ns#' term='YouTube'/><category scheme='http://www.blogger.com/atom/ns#' term='canada'/><category scheme='http://www.blogger.com/atom/ns#' term='Marathon of Hope'/><category scheme='http://www.blogger.com/atom/ns#' term='inspiration'/><title type='text'>Inspirational Canadian Terrance Stanley "Terry" Fox</title><content type='html'>&lt;b&gt;Terrance Stanley "Terry" Fox&lt;/b&gt;, CC (July 28, 1958 – June 28, 1981) was a Canadian humanitarian, athlete, and cancer treatment &lt;span class="mw-redirect"&gt;activist&lt;/span&gt;. He became famous for the Marathon of Hope, a cross-Canada run to raise money for cancer research, which Fox ran with one prosthetic leg. He is considered one of Canada's greatest heroes of the 20th century and is celebrated internationally every September as people participate in the Terry Fox Run, the world's largest one-day fundraiser for cancer research.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/File:TerryFoxToronto19800712.JPG" class="image" title="TerryFoxToronto19800712.JPG"&gt;&lt;img alt="" src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/TerryFoxToronto19800712.JPG/225px-TerryFoxToronto19800712.JPG" border="0" height="485" width="225" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="padding-top: 2pt;"&gt;&lt;span style=""&gt;Terry Fox in Toronto during his &lt;a href="http://en.wikipedia.org/wiki/Marathon_of_Hope" title="Marathon of Hope"&gt;Marathon of Hope&lt;/a&gt; cross-country run (July 1980).&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Source&lt;/span&gt;: &lt;a href="http://en.wikipedia.org/wiki/Terry_Fox"&gt;http://en.wikipedia.org/wiki/Terry_Fox&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-5694843023438448125?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/5694843023438448125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=5694843023438448125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5694843023438448125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5694843023438448125'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2009/05/inspirational-canadian-terrance-stanley.html' title='Inspirational Canadian Terrance Stanley &quot;Terry&quot; Fox'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-8192580508138090664</id><published>2009-02-21T09:41:00.000+08:00</published><updated>2009-03-21T09:50:41.711+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pharmaceutical'/><category scheme='http://www.blogger.com/atom/ns#' term='Health Hazard'/><category scheme='http://www.blogger.com/atom/ns#' term='Danger to Baby'/><category scheme='http://www.blogger.com/atom/ns#' term='Child care'/><category scheme='http://www.blogger.com/atom/ns#' term='Doctor'/><category scheme='http://www.blogger.com/atom/ns#' term='Chemical'/><category scheme='http://www.blogger.com/atom/ns#' term='Flu'/><category scheme='http://www.blogger.com/atom/ns#' term='Tags: Haelth'/><category scheme='http://www.blogger.com/atom/ns#' term='Vicks'/><category scheme='http://www.blogger.com/atom/ns#' term='Parenting'/><category scheme='http://www.blogger.com/atom/ns#' term='News'/><category scheme='http://www.blogger.com/atom/ns#' term='Influenza'/><category scheme='http://www.blogger.com/atom/ns#' term='DANGER'/><category scheme='http://www.blogger.com/atom/ns#' term='VapoRub'/><category scheme='http://www.blogger.com/atom/ns#' term='Article'/><title type='text'>Dangerous VapoRub for children</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_cCmvObyemK4/ScRHzqWrFBI/AAAAAAAAAb8/HXrLxcxWdTk/s1600-h/vick-vaporub-hazard-health-danger-children-00.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 218px;" src="http://4.bp.blogspot.com/_cCmvObyemK4/ScRHzqWrFBI/AAAAAAAAAb8/HXrLxcxWdTk/s320/vick-vaporub-hazard-health-danger-children-00.jpg" alt="" id="BLOGGER_PHOTO_ID_5315452413072315410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span id="konasapn0"&gt;2 &lt;strong&gt;health&lt;/strong&gt; articles on &lt;strong&gt;VapoRub&lt;/strong&gt; usage on &lt;strong&gt;children&lt;/strong&gt; under two years old.. Take precautions when you use this medicine.  See more details articles &gt;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="konasapn0"&gt;&lt;/span&gt;&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2009/03/19/health-dont-use-vaporub-on-children-under-2/" rel="bookmark" title="Read Health: Don’t use VapoRub on Children under 2"&gt;Health: Don’t use VapoRub on Children under 2&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;&lt;span id="konasapn0"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="konasapn0"&gt;Tags: &lt;a href="http://technorati.com/tag/Haelth" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt;Haelth&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Danger" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Danger&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Vicks" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Vicks&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Article" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Article&lt;/a&gt;, &lt;a href="http://technorati.com/tag/News" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; News&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Danger+to+Baby" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Danger to Baby&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Parenting" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Parenting&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Health+Hazard" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Health Hazard&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Chemical" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Chemical&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Flu" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Flu&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Influenza" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Influenza&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Pharmaceutical" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Pharmaceutical&lt;/a&gt;, &lt;a href="http://technorati.com/tag/VapoRub" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; VapoRub&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Child+care" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Child care&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Doctor" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Doctor&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-8192580508138090664?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/8192580508138090664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=8192580508138090664' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8192580508138090664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8192580508138090664'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2009/02/dangerous-vaporub-for-children.html' title='Dangerous VapoRub for children'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_cCmvObyemK4/ScRHzqWrFBI/AAAAAAAAAb8/HXrLxcxWdTk/s72-c/vick-vaporub-hazard-health-danger-children-00.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-5467740597359152685</id><published>2008-10-23T12:12:00.000+08:00</published><updated>2008-10-23T12:13:18.641+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web marketing'/><category scheme='http://www.blogger.com/atom/ns#' term='Make Money Online'/><category scheme='http://www.blogger.com/atom/ns#' term='Internet Marketing'/><category scheme='http://www.blogger.com/atom/ns#' term='SEO'/><category scheme='http://www.blogger.com/atom/ns#' term='online business'/><title type='text'>What is Internet Marketing??</title><content type='html'>&lt;div class="body"&gt; &lt;p&gt;&lt;img src="http://maverickchen.textmalaysia.com/upload_files/286/368/6534/equality.ws_Tree_Of_Light_by_lowapproach.jpg" border="0" height="289" width="436" /&gt;What is&lt;strong&gt; Internet Marketing?&lt;/strong&gt;? &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Internet marketing&lt;/strong&gt; is still a complete mystery to a large majority of Internet users. For many users, internet marketing is seen as some foreign area of the web, populated with silly get-rich-quick schemes and unsavory characters ready to rip off the innocent and uninformed consumer at the click of a mouse. Continue to read more.. &lt;a style="font-family: Arial,Helvetica,sans-serif; font-size: 18px;" href="http://feeds.feedburner.com/%7Er/pjlighthouse/FwxH/%7E3/428047402/" target="_blank"&gt;SEO: 5 Most Popular Forms of Internet Marketing&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-5467740597359152685?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/5467740597359152685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=5467740597359152685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5467740597359152685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5467740597359152685'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/10/what-is-internet-marketing.html' title='What is Internet Marketing??'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-2996332093997169875</id><published>2008-10-02T09:24:00.001+08:00</published><updated>2008-10-14T09:27:19.497+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='facts'/><category scheme='http://www.blogger.com/atom/ns#' term='animal kingddom'/><category scheme='http://www.blogger.com/atom/ns#' term='animation'/><category scheme='http://www.blogger.com/atom/ns#' term='joke'/><category scheme='http://www.blogger.com/atom/ns#' term='fun facts'/><category scheme='http://www.blogger.com/atom/ns#' term='crazy funny'/><title type='text'>Birds, Animals and Trees Amaze you!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_cCmvObyemK4/SPP1RhoH4hI/AAAAAAAAAZo/rDyAhQLqntA/s1600-h/funny-junk-crazy-animal-fact-elepangt-dota.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_cCmvObyemK4/SPP1RhoH4hI/AAAAAAAAAZo/rDyAhQLqntA/s320/funny-junk-crazy-animal-fact-elepangt-dota.jpg" alt="" id="BLOGGER_PHOTO_ID_5256814871504740882" border="0" /&gt;&lt;/a&gt;&lt;strong&gt;Here's some amazing facts about Birds, Animals and Trees amaze you!&lt;/strong&gt; &lt;p&gt;1) &lt;strong&gt;SNAILS&lt;/strong&gt; have 14175 teeth laid along 135 rows on their tongue.&lt;/p&gt; &lt;p&gt;2) A &lt;strong&gt;BUTTERFLY&lt;/strong&gt; has 12,000 eyes.&lt;/p&gt; &lt;p&gt;3) &lt;strong&gt;DOLPHINS&lt;/strong&gt; sleep with 1 eye open.&lt;/p&gt; &lt;p&gt;4) A &lt;strong&gt;BLUE WHALE&lt;/strong&gt; can eat as much as 3 tonnes of food everyday, but at the same time can live without food for 6 months.&lt;/p&gt; &lt;p&gt;5) &lt;strong&gt;ELEPHANT&lt;/strong&gt; teeth can weigh as much as 9 pounds.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;6) The fierce &lt;strong&gt;DINOSAUR &lt;/strong&gt;was&lt;strong&gt; TRYNOSAURS &lt;/strong&gt;which has sixty long &amp;amp; sharp teeth, used to attack &amp;amp; eat other dinosaurs.&lt;/p&gt; &lt;p&gt;7) &lt;strong&gt;DIMETRODON &lt;/strong&gt;was a mammal like REPTILE with a snail on its back. This acted as a radiator to cool the body of the animal.&lt;/p&gt; &lt;p&gt;8) &lt;strong&gt;CASSOWARY&lt;/strong&gt; is one of the dangerous BIRD, that can kill a man or animal by tearing off with its dagger like claw.&lt;/p&gt;Read more here &lt;span style="font-weight: bold;"&gt;: &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://www.pjlighthouse.com/2008/10/12/cool-amazing-world-facts/" rel="bookmark" title="Read Cool &amp;amp; Amazing World Facts"&gt;Cool &amp;amp; Amazing World Facts&lt;/a&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-2996332093997169875?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/2996332093997169875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=2996332093997169875' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/2996332093997169875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/2996332093997169875'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/10/birds-animals-and-trees-amaze-you.html' title='Birds, Animals and Trees Amaze you!'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_cCmvObyemK4/SPP1RhoH4hI/AAAAAAAAAZo/rDyAhQLqntA/s72-c/funny-junk-crazy-animal-fact-elepangt-dota.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-7104224592507527661</id><published>2008-08-14T09:27:00.000+08:00</published><updated>2008-10-14T09:33:47.415+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Create'/><category scheme='http://www.blogger.com/atom/ns#' term='Drop Down list'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='Select'/><category scheme='http://www.blogger.com/atom/ns#' term='How to'/><category scheme='http://www.blogger.com/atom/ns#' term='background color'/><category scheme='http://www.blogger.com/atom/ns#' term='different font'/><title type='text'>How to Create Select Drop Down list with different font and background color</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_cCmvObyemK4/SPP2xySwIFI/AAAAAAAAAZw/PjOqXKhZx3c/s1600-h/mr-bean-happy.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_cCmvObyemK4/SPP2xySwIFI/AAAAAAAAAZw/PjOqXKhZx3c/s320/mr-bean-happy.gif" alt="" id="BLOGGER_PHOTO_ID_5256816525245947986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Here's some useful codes to create drop down list to create &lt;span style="font-weight: bold;"&gt;dropdown list with  font and background color in HTML&lt;/span&gt; :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Paste code below in between your HEAD tags&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;script language="JavaScript"&gt;&lt;br /&gt;&lt;!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0   eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");   if (restore) selObj.selectedIndex=0; } //--&gt;&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Paste code below in between your BODY tags&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;select name="select" onchange="MM_jumpMenu('parent',this,0)" style="color: rgb(255, 204, 255); background-color: rgb(0, 102, 255);"&gt;&lt;option selected="selected"&gt;TEST&lt;/option&gt;&lt;option value="http://www.test1.com"&gt;Test 1&lt;/option&gt;&lt;option value="http://www.test2.com"&gt;Test 2&lt;/option&gt;&lt;option value="http://www.test3.com"&gt;Test 3&lt;/option&gt;&lt;option value="http://test4.com"&gt;Test 4&lt;/option&gt;&lt;/select&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-7104224592507527661?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/7104224592507527661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=7104224592507527661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/7104224592507527661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/7104224592507527661'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/08/how-to-create-select-drop-down-list.html' title='How to Create Select Drop Down list with different font and background color'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_cCmvObyemK4/SPP2xySwIFI/AAAAAAAAAZw/PjOqXKhZx3c/s72-c/mr-bean-happy.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-9066197116418214243</id><published>2008-07-12T10:47:00.000+08:00</published><updated>2008-07-25T11:39:26.552+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Count'/><category scheme='http://www.blogger.com/atom/ns#' term='checking'/><category scheme='http://www.blogger.com/atom/ns#' term='sql tips'/><category scheme='http://www.blogger.com/atom/ns#' term='MS SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='Query'/><category scheme='http://www.blogger.com/atom/ns#' term='Leap Year'/><title type='text'>SQL Server Function to Determine a Leap Year</title><content type='html'>&lt;p&gt;&lt;u&gt;&lt;b&gt;Problem&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;I need to write a function to determine if particular year is a leap year (i.e. February contains 29 days rather than 28 days). I know that there are various rules for calculating leap years. Is there an easy way to figure this out? Can you provide an example or two to validate various years?&lt;/p&gt; &lt;p&gt;&lt;u&gt;&lt;b&gt;Solution&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;Yes, there a few rules to consider when determining when a year is a leap year. For instance, contrary to popular belief not all years divisible by 4 are leap years. For instance, the year 1900 was not a leap year. However, you needn't bother yourself about leap year rules... you can let the SQL Server engine do the work for you! &lt;/p&gt;&lt;p&gt;The following scalar &lt;a href="http://www.mssqltips.com/tip.asp?tip=1372" target="_blank"&gt;function&lt;/a&gt; takes in a year and returns a bit flag indicating whether the passed in year is a leap year or not.  &lt;/p&gt;&lt;div align="center"&gt; &lt;table id="table1" border="1" cellpadding="3" width="600"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;create function dbo.fn_IsLeapYear (@year int)&lt;br /&gt;returns bit&lt;br /&gt;as&lt;br /&gt;begin&lt;br /&gt;    return(select case datepart(mm, dateadd(dd, 1, cast((cast(@year as varchar(4)) + '0228') as datetime)))&lt;br /&gt;    when 2 then 1&lt;br /&gt;    else 0&lt;br /&gt;    end)&lt;br /&gt;end&lt;br /&gt;go&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt; &lt;p&gt;That's all there is to it! The function takes in the year, appends '0228' to it (for February 28th) and adds a day. If the month of the next day is a 2 (as extracted by the &lt;a href="http://www.mssqltips.com/tip.asp?tip=1145" target="_blank"&gt;DATEPART&lt;/a&gt; function), then we're still in February so it must be a leap year!  If not, it is not a leap year.&lt;/p&gt;Here are a few examples:  &lt;div align="center"&gt; &lt;table id="table1" border="1" cellpadding="3" width="400"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;select dbo.fn_IsLeapYear(1900) as 'IsLeapYear?'&lt;br /&gt;select dbo.fn_IsLeapYear(2000) as 'IsLeapYear?'&lt;br /&gt;select dbo.fn_IsLeapYear(2007) as 'IsLeapYear?'&lt;br /&gt;select dbo.fn_IsLeapYear(2008) as 'IsLeapYear?'&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;   &lt;div align="center"&gt;&lt;img src="http://www.mssqltips.com/tipImages/1527_fig-1.jpg" border="0" height="402" width="427" /&gt; &lt;/div&gt;   &lt;p&gt;As you can see, sometimes you can leverage the SQL Server engine to do some heavy lifting for you! &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-9066197116418214243?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/9066197116418214243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=9066197116418214243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/9066197116418214243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/9066197116418214243'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/07/sql-server-function-to-determine-leap.html' title='SQL Server Function to Determine a Leap Year'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-4443899110109199390</id><published>2008-07-05T04:57:00.000+08:00</published><updated>2008-07-07T04:58:54.557+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Super Cool'/><category scheme='http://www.blogger.com/atom/ns#' term='Sony Computer Entertainment'/><category scheme='http://www.blogger.com/atom/ns#' term='PS9'/><category scheme='http://www.blogger.com/atom/ns#' term='Playstation 9'/><title type='text'>Sony Computer Entertainment - Playstation 9</title><content type='html'>&lt;div class="thecontent"&gt;&lt;p&gt;&lt;img src="http://mytypes.com/pjlighthouse/files/2008/07/playstation-9-cool-ads-art-2008-23.jpg" alt="Super Cool Ads by Sony Computer Entertainment - Playstation 9" /&gt; A superb cool advertisement from &lt;strong&gt;Sony Computer Entertainment&lt;/strong&gt; for their &lt;strong&gt;Playstation 9&lt;/strong&gt; (&lt;strong&gt;PS9&lt;/strong&gt;), which the company claims will be released in year 2078. Watch the video here  see what the future holds &gt;&gt;&lt;/p&gt; &lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2008/07/06/cool-stuff-sony-playstation-9/" rel="bookmark" title="Sony Playstation 9"&gt;Cool Stuff: Sony Playstation 9&lt;/a&gt;&lt;/h2&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-4443899110109199390?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/4443899110109199390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=4443899110109199390' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/4443899110109199390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/4443899110109199390'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/07/sony-computer-entertainment-playstation.html' title='Sony Computer Entertainment - Playstation 9'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-8199207078152779443</id><published>2008-07-04T21:23:00.000+08:00</published><updated>2008-07-04T23:29:51.906+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Entrepreneurism'/><category scheme='http://www.blogger.com/atom/ns#' term='quotes'/><category scheme='http://www.blogger.com/atom/ns#' term='Quote'/><category scheme='http://www.blogger.com/atom/ns#' term='Enthusiasm'/><category scheme='http://www.blogger.com/atom/ns#' term='Weekly Quotes'/><category scheme='http://www.blogger.com/atom/ns#' term='Freedom'/><title type='text'>Weekly Quote - Freedom, Entrepreneurism &amp; Enthusiasm</title><content type='html'>&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2008/06/30/quotes-of-the-week-freedom-entrepreneurism-enthusiasm/" rel="bookmark" title="Read Quotes of the Week - Freedom, Entrepreneurism &amp;amp; Enthusiasm"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/h2&gt;      &lt;small class="date"&gt;      &lt;span class="date_day"&gt;&lt;/span&gt; &lt;/small&gt;&lt;img alt="Quotes, Motivation, Personal Development,Freedom, Entrepreneurism, Enthusiasm, John Adams, Mark Victor, Mark Twain, Weekly Quote, Quotable Quote, Famous Word" id="image3684" src="http://www.pjlighthouse.com/wp-content/uploads/2008/07/quote-weekly-chris-foss-imaginary-fantasy-art.jpg" /&gt; &lt;strong&gt;FREEDOM&lt;/strong&gt;&lt;br /&gt;“We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights that among these are Life, Liberty and the pursuit of Happiness.” ~The Declaration of Independence&lt;br /&gt;“In order to live free and happily you must sacrifice boredom. It is not always an easy sacrifice.” ~Richard Bach&lt;br /&gt;Posterity! You will never know how much it cost the present generation to preserve your freedom! I hope you will make good use of it! (letter to Abigail Adams, April 26, 1777) ~John Adams&lt;br /&gt;“These are the times that try men’s souls. The summer soldier and the sunshine patriot will, in this crisis, shrink from the service of their country; but he that stands it now, deserves the love and thanks of man and woman.” ~Thomas Paine&lt;br /&gt;Read more ..&lt;br /&gt;&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2008/06/30/quotes-of-the-week-freedom-entrepreneurism-enthusiasm/" rel="bookmark" title="Read Quotes of the Week - Freedom, Entrepreneurism &amp;amp; Enthusiasm"&gt;Quotes of the Week - Freedom, Entrepreneurism &amp;amp; Enthusiasm&lt;/a&gt;&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-8199207078152779443?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/8199207078152779443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=8199207078152779443' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8199207078152779443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8199207078152779443'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/07/weekly-quote-freedom-entrepreneurism.html' title='Weekly Quote - Freedom, Entrepreneurism &amp; Enthusiasm'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-1956828604434146114</id><published>2008-07-03T04:55:00.000+08:00</published><updated>2008-07-07T04:57:06.448+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Map'/><category scheme='http://www.blogger.com/atom/ns#' term='World of Warcraft'/><category scheme='http://www.blogger.com/atom/ns#' term='Allstars'/><category scheme='http://www.blogger.com/atom/ns#' term='DotA'/><category scheme='http://www.blogger.com/atom/ns#' term='v6.52d'/><title type='text'>DotA: WoWt DotA All-stars v6.52d Map</title><content type='html'>&lt;h3 class="storytitle" id="post-187"&gt;&lt;a href="http://mytypes.com/pjlighthouse/2008/06/08/dota-wow-dota-all-stars-v652d-map-free-download-link/" rel="bookmark"&gt;DotA: WOW DotA All-Stars v6.52d Map Free Download Link&lt;/a&gt; &lt;/h3&gt;                     &lt;div class="thecontent"&gt;&lt;p&gt;&lt;img src="http://www.pjlighthouse.com/wp-content/uploads/2008/06/dota-v652d-map-warcraft-woww-dota-allstars-warcfrt-download-map.JPG" alt="World of Warcraft DotA v6.52d Map Download Link, Warcraft,   WOW,   Gaming, Download , Dota-Allstars, Spirit Bear, v6.49b ,   v6.43b,   AI Maps, 6.52c Map, Download" /&gt; Check out the Latest &lt;strong&gt;World Of Wwarcraft Dota-Allstars map&lt;/strong&gt; is out.. here’s the change logs and download links of DotA &lt;strong&gt;v6.52d&lt;/strong&gt; map at the end of the post .. Enjoy the maps download here &gt;&gt;&lt;/p&gt; &lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2008/06/17/dota-world-of-warcraft-dota-allstars-v652d-map-download-link/" rel="bookmark" title="World of Warcraft DotA Allstars v6.52d Map Download Link"&gt;DotA: World of Warcraft DotA Allstars v6.52d Map Download Link&lt;/a&gt;&lt;/h2&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-1956828604434146114?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/1956828604434146114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=1956828604434146114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/1956828604434146114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/1956828604434146114'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/07/dota-wowt-dota-all-stars-v652d-map.html' title='DotA: WoWt DotA All-stars v6.52d Map'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-2491286263079579115</id><published>2008-06-24T10:08:00.000+08:00</published><updated>2008-07-25T10:09:38.777+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Calculating'/><category scheme='http://www.blogger.com/atom/ns#' term='MS SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Mathematical Values'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Expert Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Tips: Calculating Mathematical Values in SQL Server</title><content type='html'>&lt;p&gt;&lt;u&gt;&lt;b&gt;Problem&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;In our application we have the need to perform mathematical calculations.  Right now we are doing so in our front end application.  Unfortunately we are starting to experience performance problems with large data sets and differences in calculations due to developers using different logic.  We are seeking some other options to perform the calculations.  Does SQL Server perform basic mathematical calculations?&lt;/p&gt; &lt;p&gt;&lt;u&gt;&lt;b&gt;Solution&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;Yes - SQL Server can perform basic addition, subtraction, multiplication and division.  So if you need some of those basic building blocks those are available and we will walk through some examples in this tip.  In addition, SQL Server can calculate SUM, COUNT, AVG, etc.  For these type of calculations, check out &lt;a href="http://www.mssqltips.com/tip.asp?tip=1221" target="_blank"&gt;SQL Server T-SQL Aggregate Functions&lt;/a&gt;.  To address the multiple code issues, I would recommend researching stored procedures.  This tip &lt;a href="http://www.mssqltips.com/tip.asp?tip=1495" target="_blank"&gt;Getting started with SQL Server stored procedures&lt;/a&gt; is probably a good place to start.&lt;/p&gt; &lt;p&gt;In this tip, let's focus on some basic building blocks to perform your calculations with the T-SQL language.  Here are the examples we will cover:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Calculations on Values&lt;/li&gt;&lt;li&gt;Calculations on Parameters&lt;/li&gt;&lt;li&gt;Calculations on Columns&lt;/li&gt;&lt;li&gt;Calculations in Computed Columns&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;i&gt;&lt;b&gt;Calculations on Values&lt;/b&gt;&lt;/i&gt;&lt;/p&gt; &lt;p&gt;As a starting point, values themselves can have mathematical operations performed on them.  So in the code below we are performing addition (+), subtraction (-), multiplication (*), division (/) and a combination of operations.  In these examples, both positive and negative whole numbers and decimals are used.  The value calculated by the statement is below the code to serve as a point of reference.  Review and copy the code into a SQL Server 2005 Management Studio window to get a feel for these calculations.  Certainly this list is not comprehensive, so feel free to test some operations in your applications or from your experiences.&lt;/p&gt; &lt;div align="center"&gt; &lt;table id="table2" border="1" width="600"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="center" bgcolor="#c0c0c0"&gt;&lt;b&gt;Calculations on Values&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- Example 1 - Addition (+)&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 1 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 1&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#008000;"&gt;&lt;span style="font-family:Arial;"&gt;-- = 2&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 1 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 3 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 4 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 99 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 704&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#008000;"&gt;&lt;span style="font-family:Arial;"&gt;-- = 813&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 1.5 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 1.5&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#008000;"&gt;&lt;span style="font-family:Arial;"&gt;-- = 3.0&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; .25678 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; .00096356&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#008000;"&gt;&lt;span style="font-family:Arial;"&gt;-- = 0.25774356&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 1.75 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;span style="font-size:85%;"&gt;2.25&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;-- = -0.50&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;-- Example 2 - Subtraction (-)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 1 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 1&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#008000;"&gt;&lt;span style="font-family:Arial;"&gt;-- = 0&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 918 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 704&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#008000;"&gt;&lt;span style="font-family:Arial;"&gt;-- = 214&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 3.2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; 1.9&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 1.3&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 1.9 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; 3.2&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = -1.3&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 9 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 3 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; 3 &lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 3&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; .75 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; .68&lt;/span&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;-- = 0.07&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#008000;"&gt; &lt;p&gt;&lt;span style="font-family:Arial;"&gt;-- Example 3 - Multiplication (*)&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 1 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; 1&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 1&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;4&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = -8&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 5 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; 10&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 100&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 1.25 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; 3&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 3.75&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; .4 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; .5&lt;/span&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;-- = .20&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#008000;"&gt; &lt;p&gt;&lt;span style="font-family:Arial;"&gt;-- Example 4 - Division (/)&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 1&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;2&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 0&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 1.0&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;2.0&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 0.500000&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 0&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;5&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 0&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 100&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;12&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 8&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 100.0&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;12.0&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 8.333333&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;span style="font-size:85%;"&gt;75.0&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;4.5&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = -16.666666&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; .5&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;.1&lt;/span&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;-- = 5.000000&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#008000;"&gt; &lt;p&gt;&lt;span style="font-family:Arial;"&gt;-- Example 5 - Combination&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;((&lt;/span&gt;&lt;span style="font-size:85%;"&gt;100 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 100&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;span style="font-size:85%;"&gt; .05&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#808080;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- = 10.00&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;10 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 5&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)/&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;2&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 2&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;10.0 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 5.0&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)/&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;2.0&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 2.500000&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;((&lt;/span&gt;&lt;span style="font-size:85%;"&gt;100 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 100&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;50 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 50&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#808080;"&gt;))&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- = 100&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt; &lt;p&gt;&lt;i&gt;&lt;b&gt;Calculations on Parameters&lt;/b&gt;&lt;/i&gt;&lt;/p&gt; &lt;p&gt;Since we have covered the bulk of the calculations in the section above let's just focus on a few different operations to show how parameters with specific data types play an important role.  Since this set of examples are not comprehensive, feel free to copy the code below into a SQL Server 2005 Management Studio window and test the code with some of your own logic.&lt;/p&gt; &lt;div align="center"&gt; &lt;table id="table3" border="1" width="600"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td bgcolor="#c0c0c0"&gt; &lt;p align="center"&gt;&lt;b&gt;Calculations on Parameters&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;color:#008000;"&gt;&lt;span style="font-family:Arial;"&gt;-- Variable declaration&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;DECLARE&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @i1 &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;int&lt;br /&gt;DECLARE&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @i2 &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;int&lt;br /&gt;DECLARE&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @i3 &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;int&lt;br /&gt;DECLARE&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @d1 &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;decimal&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;10&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;span style="font-size:85%;"&gt;2&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;DECLARE&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @d2 &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;decimal&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;10&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;span style="font-size:85%;"&gt;2&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;DECLARE&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @d3 &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;decimal&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;10&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;span style="font-size:85%;"&gt;2&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#008000;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#008000;"&gt;&lt;span style="font-family:Arial;"&gt;-- Initialize variables&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SET&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @i1 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;=&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 100&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SET&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @i2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;=&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 75&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SET&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @i3 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;=&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 50&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SET&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @d1 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;=&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 1.5&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SET&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @d2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;=&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 5.5&lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SET&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @d3 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Arial;"&gt; .575&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- Example 1 - Addition (+)&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; @i1 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @i2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @i3 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @d1 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @d2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; @d3 &lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 232.58&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; @d2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;@d3&lt;/span&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;-- = 4.92&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;-- Example 2 - Subtraction (-)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; @i2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; @i3&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 25&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; @d2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; @d3 &lt;/span&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;-- = 4.92&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;-- Example 3 - Multiplication (*)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; @i2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; @i3&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 3750&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; @d2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; @d3 &lt;/span&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;-- = 3.1900&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;-- Example 4 - Division (/)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; @i2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; @i3&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;&lt;br /&gt;-- = 1&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; @d2 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; @d3 &lt;/span&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;-- = 9.4827586206896&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#008000;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;-- Example 5 - Combination&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;((&lt;/span&gt;&lt;span style="font-size:85%;"&gt;@i1 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @i2&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @d2&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- = 962.50&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;((&lt;/span&gt;&lt;span style="font-size:85%;"&gt;@i1 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @i2&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;-&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;@d1 &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @d2&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;))&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- = 168.00&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt; &lt;p&gt;&lt;i&gt;&lt;b&gt;Calculations on Columns&lt;/b&gt;&lt;/i&gt;&lt;/p&gt; &lt;p&gt;Another option is to calculate the values based on a SELECT statement as the example below shows.  If the data is in 1 or more columns, this approach eliminates the need to calculate the values based on additional parameters or logic.&lt;/p&gt; &lt;div align="center"&gt; &lt;table id="table4" border="1" width="600"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td bgcolor="#c0c0c0"&gt; &lt;p align="center"&gt;&lt;b&gt;Calculations on Columns&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- Sample Table&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;CREATE&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;TABLE&lt;/span&gt;&lt;span style="font-size:85%;"&gt; dbo&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;.&lt;/span&gt;&lt;span style="font-size:85%;"&gt;CalculationExample&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;(&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;ProductID &lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;NOT&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;NULL,&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Cost &lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;decimal&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;10&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;span style="font-size:85%;"&gt;2&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;NOT&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;NULL)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;GO&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- Populate Table&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;INSERT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;INTO&lt;/span&gt;&lt;span style="font-size:85%;"&gt; dbo&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;.&lt;/span&gt;&lt;span style="font-size:85%;"&gt;CalculationExample&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;ProductID&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Cost&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 1&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Arial;"&gt; 100.00&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;UNION&lt;br /&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 2&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Arial;"&gt; 50.00&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;UNION&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 3&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; 25.00&lt;br /&gt;GO&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- Verify Insertion&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;FROM&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; dbo&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;.&lt;/span&gt;&lt;span style="font-size:85%;"&gt;CalculationExample&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:6;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;GO&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- Declare Variables&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;DECLARE&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; @MarginPercent &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;decimal&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;10&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 2&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;DECLARE&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; @TaxPercent &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;decimal&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;10&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 2&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- Initialize Variables&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;SET&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; @MarginPercent &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Arial;"&gt; .20&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SET&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; @TaxPercent &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Arial;"&gt; .05&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt; &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- Calculate Values&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; ProductID&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;Cost&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;Cost &lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @MarginPercent &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;'Margin'&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;Cost &lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @TaxPercent &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;'Tax'&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;Cost &lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;Cost &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @MarginPercent&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;Cost &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;span style="font-size:85%;"&gt; @TaxPercent&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;&lt;span style="font-family:Arial;"&gt;'FinalCost'&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;FROM&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; dbo&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;.&lt;/span&gt;&lt;span style="font-size:85%;"&gt;CalculationExample&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:6;"&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;GO&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt; &lt;p&gt;&lt;i&gt;&lt;b&gt;Calculations in &lt;/b&gt;&lt;/i&gt;&lt;b&gt;&lt;i&gt;Computed Columns&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p&gt;Let's take those same calculations and now move them to computed columns in the table.  Here is that example:&lt;/p&gt; &lt;div align="center"&gt; &lt;table id="table5" border="1" width="600"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td bgcolor="#c0c0c0"&gt; &lt;p align="center"&gt;&lt;b&gt;Calculations in Computed Columns&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;CREATE&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;TABLE&lt;/span&gt;&lt;span style="font-size:85%;"&gt; [dbo]&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;.&lt;/span&gt;&lt;span style="font-size:85%;"&gt;[CalculationExample_ComputedColumns&lt;/span&gt;&lt;span style="font-size:85%;"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;[ProductID] [int] &lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#808080;"&gt;NOT&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;NULL,&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;[Cost] [decimal]&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;18&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 0&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;NOT&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;NULL,&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;[Tax] &lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;[Cost]&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;0.05&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;)),&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;[Margin] &lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;[Cost]&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;0.20&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;)),&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;[FinalCost] &lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;AS&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;((&lt;/span&gt;&lt;span style="font-size:85%;"&gt;[Cost]&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;+&lt;/span&gt;&lt;span style="font-size:85%;"&gt;[Cost&lt;/span&gt;&lt;span style="font-size:85%;"&gt;]&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;0.20&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;))+&lt;/span&gt;&lt;span style="font-size:85%;"&gt;[Cost]&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;0.05&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;&lt;span style="font-family:Arial;"&gt;)),&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;CONSTRAINT&lt;/span&gt;&lt;span style="font-size:85%;"&gt; [PK_CalculationExample_ComputedColumns] &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;PRIMARY&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;KEY&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;CLUSTERED&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Arial;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#808080;"&gt;&lt;br /&gt;(&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;[ProductID] &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;span style="font-family:Arial;"&gt;ASC&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#808080;"&gt;&lt;br /&gt;)&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;WITH&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;PAD_INDEX &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;=&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;OFF&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;span style="font-size:85%;"&gt; IGNORE_DUP_KEY &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;=&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;OFF&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;)&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;ON&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Arial;"&gt; [PRIMARY]&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#808080;"&gt;&lt;br /&gt;)&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;ON&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Arial;"&gt; [PRIMARY]&lt;/span&gt;&lt;/span&gt; &lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- Populate Table&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;INSERT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;INTO&lt;/span&gt;&lt;span style="font-size:85%;"&gt; dbo&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;.&lt;/span&gt;&lt;span style="font-size:85%;"&gt;CalculationExample&lt;/span&gt;&lt;span style="font-size:85%;"&gt;_ComputedColumns &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;ProductID&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Cost&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#808080;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 1&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; 100.00&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;UNION&lt;br /&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 2&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; 50.00&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;UNION&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; 3&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; 25.00&lt;br /&gt;GO&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;color:#008000;"&gt;-- Review the values&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:#0000ff;"&gt;SELECT&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;*&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;color:#0000ff;"&gt;&lt;br /&gt;FROM&lt;/span&gt;&lt;span style="font-size:85%;"&gt; dbo&lt;/span&gt;&lt;span style="font-size:85%;color:#808080;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;CalculationExample_ComputedColumns&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;GO&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-2491286263079579115?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/2491286263079579115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=2491286263079579115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/2491286263079579115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/2491286263079579115'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/06/sql-tips-calculating-mathematical.html' title='SQL Tips: Calculating Mathematical Values in SQL Server'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-838553002173297505</id><published>2008-06-07T05:01:00.000+08:00</published><updated>2008-07-07T05:02:38.682+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BMW GINA'/><category scheme='http://www.blogger.com/atom/ns#' term='automobile'/><category scheme='http://www.blogger.com/atom/ns#' term='Cool Stuff'/><title type='text'>BMW GINA Light Visionary Photos</title><content type='html'>&lt;span&gt;&lt;span&gt;&lt;img src="http://www.pjlighthouse.com/wp-content/uploads/2008/06/cool-concept-bmw-beemer-car-000.jpg" alt="amazing, autoworld, bmw, car, cool-stufff, crazy, gadget, geometry-and-functions-n-adaptations, gina, light-visionary, modern-car, photos, skin, stuff" /&gt;&lt;/span&gt;&lt;/span&gt; &lt;span&gt;&lt;span&gt;The&lt;strong&gt; BMW GINA&lt;/strong&gt; (Geometry and Functions in ‘N’ Adaptations) Light Visionary concept is BMW’s future-focused design study on the possibilities offered by flexible coverings. Based on a 2-seater roadster platform, GINA’s revolutionary exterior has allowed its designers to do away with the traditional body panel approach, concentrating on visual and structural lines rather than full body pieces. Check out more photos &gt;&gt; &lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span&gt;&lt;span&gt;&lt;a href="http://www.pjlighthouse.com/2008/06/13/cool-stuff-bmw-gina-geometry-and-functions-in-n-adaptations-light-visionary-photos/" rel="bookmark" title="BMW GINA (Geometry and Functions in ‘N’ Adaptations) Light Visionary Photos"&gt;Cool Stuff: BMW GINA (Geometry and Functions in ‘N’ Adaptations) Light Visionary Photos&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;    &lt;span&gt;&lt;span&gt;          &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-838553002173297505?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/838553002173297505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=838553002173297505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/838553002173297505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/838553002173297505'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/06/bmw-gina-light-visionary-photos.html' title='BMW GINA Light Visionary Photos'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-640420469901714497</id><published>2008-05-14T19:45:00.000+08:00</published><updated>2008-05-14T19:47:18.757+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Iconic Building'/><category scheme='http://www.blogger.com/atom/ns#' term='Shanghai'/><category scheme='http://www.blogger.com/atom/ns#' term='Human'/><category scheme='http://www.blogger.com/atom/ns#' term='REN'/><category scheme='http://www.blogger.com/atom/ns#' term='Cool Stuff'/><title type='text'>Cool Stuff: Shanghai REN (Human) Iconic Building</title><content type='html'>&lt;small class="date"&gt;      &lt;span class="date_day"&gt;&lt;/span&gt;&lt;span class="date_year"&gt;&lt;/span&gt; &lt;/small&gt;&lt;img alt="Cool Stuff, Shanghai REN, Human, Iconic Building, Construction, 2008, Olympics" id="image3507" src="http://www.pjlighthouse.com/wp-content/uploads/2008/05/shanghai-ren-human-icon-building-world-010.jpg" /&gt; REN = &lt;img alt="Cool Stuff: Shanghai REN (Human) Iconic Building - Cool , Shanghai REN, Human, Iconic Building, Construction, 2008, Olympics" id="image3506" src="http://www.pjlighthouse.com/wp-content/uploads/2008/05/shanghai-ren-human-icon-building-world-00.jpg" /&gt;  =  Human in Chinese.. This is one awesome &lt;strong&gt;Architecture&lt;/strong&gt;!!! See more of this amazing &lt;strong&gt;future skyscraper&lt;/strong&gt; in &lt;strong&gt;China.. See more pics here &gt;&gt; &lt;br /&gt;&lt;/strong&gt;&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2008/05/14/cool-stuff-shanghai-ren-human-iconic-building/" rel="bookmark" title="Read Cool Stuff: Shanghai REN (Human) Iconic Building"&gt;Cool Stuff: Shanghai REN (Human) Iconic Building&lt;/a&gt;&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-640420469901714497?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/640420469901714497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=640420469901714497' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/640420469901714497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/640420469901714497'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/05/cool-stuff-shanghai-ren-human-iconic.html' title='Cool Stuff: Shanghai REN (Human) Iconic Building'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-6789755715636787739</id><published>2008-04-24T12:13:00.002+08:00</published><updated>2008-04-24T12:15:00.322+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Food'/><category scheme='http://www.blogger.com/atom/ns#' term='rice'/><category scheme='http://www.blogger.com/atom/ns#' term='Japan'/><category scheme='http://www.blogger.com/atom/ns#' term='japanese rice art'/><category scheme='http://www.blogger.com/atom/ns#' term='food art'/><title type='text'>Amazing Japanese Food Art</title><content type='html'>&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2008/04/21/food-art-cool-japanese-rice-art/" rel="bookmark" title="Read Food Art: Cool Japanese Rice Art"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/h2&gt;      &lt;small class="date"&gt;      &lt;span class="date_day"&gt;&lt;/span&gt;&lt;span class="date_year"&gt;&lt;/span&gt; &lt;/small&gt;&lt;img alt="japanese, art, food, crazy, fun, craative, brown rice, sushi, decoration" id="image3373" src="http://www.pjlighthouse.com/wp-content/uploads/2008/04/japanese-food-art-000.JPG" /&gt; These are some creative &lt;strong&gt;food art&lt;/strong&gt;..&lt;strong&gt;  japanese rice art&lt;/strong&gt;.&lt;br /&gt;&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2008/04/21/food-art-cool-japanese-rice-art/" rel="bookmark" title="Read Food Art: Cool Japanese Rice Art"&gt;Amazing Japanese Food Art&lt;/a&gt;&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-6789755715636787739?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/6789755715636787739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=6789755715636787739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/6789755715636787739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/6789755715636787739'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/04/amazing-japanese-food-art.html' title='Amazing Japanese Food Art'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-7707056334228296467</id><published>2008-04-23T12:37:00.000+08:00</published><updated>2008-04-24T12:46:02.626+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Optimize'/><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><category scheme='http://www.blogger.com/atom/ns#' term='How to'/><title type='text'>How to Optimize for Google: Part 1 of 3</title><content type='html'>&lt;span style="color: rgb(204, 0, 0);font-family:arial,sans serif,Helvetica;font-size:22;"  &gt; &lt;strong&gt;How to Optimize for Google: Part 1 of 3&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: rgb(34, 34, 34);font-family:ms sans serif,Helvetica;font-size:12;"  &gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;By Scott Van Achte, Senior SEO, StepForth (c) 2008&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span style="color: rgb(34, 34, 34);font-family:Arial,Helvetica;font-size:12;"  &gt;  &lt;p style="margin-top: 0px; margin-left: 10px; margin-right: 10px;"&gt; In today's online world search engine rankings can make your business succeed, and while rankings  in Yahoo and MSN are very valuable, their combined market value is still less than that of Google.  This makes achieving top rankings in Google that much more important.&lt;br /&gt;&lt;br /&gt;In this three-part series on How to Optimize for Google we will touch on a number of important  aspects for top Google rankings including website optimization, links, Google Webmaster tools, and  a number of other considerations.&lt;br /&gt;&lt;br /&gt;The focus of Part 1 will be with on page website optimization. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;THE RIGHT KEYWORDS&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;This article is not about keyword research so I will not spend too much time on this topic,  however, I felt it was important to at least brush on this slightly. If you are interested in reading  more, please see &lt;a href="http://news.stepforth.com/blog/2007/07/keyword-research-for-organic-seo.php" target="_blank"&gt;Keyword Research for Organic SEO&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Make sure that your targets are achievable. If you select the wrong keywords, it can make  your entire optimization experience essentially a waste. Choose keywords that are attainable  but yet still provide a reasonable search frequency for your industry. Your phrase selection  should also be targeted to bring qualified traffic to your site.&lt;br /&gt;&lt;br /&gt;Using the hotel industry as an example, targeting the word "hotel" would make very little  sense but by narrowing it down to "Victoria BC hotel" you now have less competition, and a  more qualified audience. Keep your targets in perspective and go after the obtainable rankings.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;WEBSITE OPTIMIZATION&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;There are many on-site factors that play a role in your search engine rankings. Here are a  number of those factors and what you can do to increase your chances of success.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Title Tag&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;The title tag plays one of the most important roles in search results at Google, and is  almost always the heading Google chooses for each of its listings. Placement of your target  phrase is best used near the start of the tag and repeated again in the middle or near the  end. Three uses of your target phrase may be helpful in some instances, as long as it is not  too overwhelming. For best results each page on your site should have a totally unique title tag.&lt;br /&gt;&lt;br /&gt;It is also important to remember that because Google will use this title as the main heading  for your listing, you will want to keep it attractive to potential searchers. Try to also add  a call to action, or other wording to help make your listing appear attractive to searchers.  &lt;p&gt;&lt;/p&gt; &lt;br /&gt;&lt;br /&gt;&lt;p&gt;  &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-left: 10px; margin-right: 10px;"&gt; To help illustrate the fact Google takes this tag into consideration, simply do a search for  your target phrase and take a look at the titles of the top 10. I tried a search for a rather  broad term "hotel" and saw that all 10/10 listings had it in the title tag, and 6/10 had it as  the very first word. A quick scan showed that the entire top 30 either had the word hotel, or  hotels in their title tags.&lt;br /&gt;&lt;br /&gt;If you do only one thing to your website, make sure that all your title tags are relevant,  unique, and contain your target phrase for each page.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Meta Description Tag&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;The Meta Description tag is still occasionally used by Google as the description which appears  in the search results themselves. While this used to be a more common practice Google tends to  use it most often on sites with very limited content, or those which are flash based. I have  seen it still used for content rich sites, however this is less common.&lt;br /&gt;&lt;br /&gt;The Meta Description tag still has an impact on search rankings. Your best bet when using this  tag is to keep it short and sweet with your target phrase close to the start and not repeated  more than 3 times. Like the title tag, each page on your site should have its own unique description tag.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Meta Keyword Tag&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;When it comes to Google this tag is useless, and won't influence your rankings. There is some  speculation as to whether a spammy keyword tag can however, have a negative effect on Google  rankings. As a result, if you do utilize a keyword Meta tag for the smaller engines, it is best  to keep it clean and play it safe.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Density&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Keyword density plays a role in overall rankings; however, it is not as cut and dry as it once  was. Once upon a time there was a magic number that when used could almost guarantee top rankings.&lt;br /&gt;&lt;br /&gt;This is no longer the case. Today the ideal density varies from industry to industry, phrase to  phrase. To find out what density you should aim for, take the top 10 or 20 search results and  see what percentage those sites are using. In most cases you will find that the majority of these  sites have a very similar density to one another, and this average density is a good estimation of  what you should aim for.  &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-left: 10px; margin-right: 10px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Body Text and Keyword Placement&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;The location of relevant text on your site will help establish the overall importance of your  target phrase. While you do not want to overwhelm the engines and site visitors with a bombardment  of target phrases at the top of the page, try to sprinkle in some instances as close to the top  of the page as possible.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Synonyms&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Be sure to include various synonyms for your target phrases within your body text on your site.  Google will use these synonyms to tie in the overall relevance of the page for your main target  phrases, which in turn can improve your odds.&lt;br /&gt;&lt;br /&gt;To find possible synonyms you can use a thesaurus, but the best way is to search Google itself  and see exactly what they consider to be similar. Simply search in Google for your target phrase  preceded with a tilde, such as "&lt;b&gt;~hotels&lt;/b&gt;". Next scan through the search results for any text  Google has bolded. These are all words that Google considers to be related. Using the "&lt;b&gt;~hotels&lt;/b&gt;"  example Google brings up phrases such as 'travel', 'tourism', 'accommodation', as well as various  hotel chain names such as 'Hilton Hotels'.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Keywords in Domain&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;There is still some speculation if having a target phrase as part of your top level domain (TLD)  is of use to search rankings. From my experience, yes, there is value here, although, nothing like  it was several years ago.&lt;br /&gt;&lt;br /&gt;If you are starting off in the online world and are contemplating which domain to go for,  consider one that uses your target phrase, assuming that it is both relevant to your business  name, and uses no more than a single hyphen. While multiple hyphens in a domain can be successful,  they are very common with highly spammy websites, so it is best to not take that route if possible.&lt;br /&gt;&lt;br /&gt;While having a keyword located within your domain can provide some ranking juice, I would not  suggest heading out and doing a domain swap. In most cases you would be better off working on  your existing site than starting from scratch with a new domain.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Keywords in page specific URL&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Using keywords for specific page URL's can also help add a little bit of value to your site,  providing you use them responsibly. Consider using a keyword as a directory name and as part  of a file name where it naturally makes sense to do so. If you have a website that focuses on  tourism and includes local hotel listings, you may want to consider the following structure for  your page on the Hilton:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;b&gt;MyTourismSite.com/Victoria&lt;wbr&gt;/Accommodations/Hotels/Hilton&lt;wbr&gt;.html&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Heading Tags&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Placement of target phrases within heading tags helps to establish the importance of those  given phrases. That said do not over do it, or abuse it. Only place target phrases within a  heading tag if it makes sense to do so, and don't flood a page with numerous tags. Heading  tags are not as critical as they once were, but still a good contribution to a well optimized  page.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Link Anchor text&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;This is the actual text you clíck on as part of a link. When full or partial target phrases  are used within your text links they help pass on some value to the linked page for those phrases.  This is also true when considering surrounding text. When the content around the link is also  relevant, the link holds slightly more value.&lt;br /&gt;&lt;br /&gt;While a link that simply states "clíck here" or "&lt;a href="http://www.domainname.com/" target="_blank"&gt;www.domainname.com&lt;/a&gt;" does have its place,  they provide considerably less value than a link that would use "discount hotels" as its anchor.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Image Alt Text&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;While image alt text still plays a minor role, its biggest part is within the use of image  based navigation. If you have an image linked to another page, the alt text will be attributed  much the same way as standard link anchor text is.&lt;br /&gt;&lt;br /&gt;Image Alt text should always be short and to the point and should accurately describe either  the image itself, or the page the image is linking to. Do not use alt tags as a place to stuff  keywords.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Inline Links&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;These are links that are found mid sentence or mid paragraph as opposed to a simple listing  of links as found in a menu or possibly on a sitemap. Links found mid paragraph tend to pass  on a little more value from the surrounding text and can provide more relevance to the linked page.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;Site Navigation&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;It is absolutely imperative that your website be fully spiderable by the search engines. This  may seem obvious, but often webmasters overlook Google's ability to crawl a website. Google has  become very advanced in what links it can follow and how it can spider a website, but there are  still some things that can cause significant roadblocks.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;- Flash:&lt;/b&gt; One of the most commonly made mistakes is the use of flash. If flash is used as  a sole means of site navigation then you can count on Google not viewing your internal pages, and  having a significant disadvantage in terms of site rankings.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;- Java Script / DHTML:&lt;/b&gt; These days most Java Script and even DHTML menus can be spidered by  Google, however, this is not always the case. If your site utilizes any kind of fancy navigation  and you are wondering why Google has not indexed your internal pages, check out Google's Cached  Text version of your page. If you do not see any text links, then your navigation may be invisible  to Google.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;- Images:&lt;/b&gt; Image based navigation has been safe for many years now, but if your site uses  this form of navigation it is essential to have brief, relevant alt text on all your buttons. This  alt text will act much like standard anchor text for text based links. This is not only for the  purpose of search ranking value, but take a look at Google's cached text version of your page. If  you have image based links that do not have alt text, those links do not appear. This doesn't mean  Google won't follow them, but for anyone viewing your site on a text based browser, your links will  be invisible to them.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;URL Structure&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Avoid long elaborate URL's with extraneous characters. While Google has reached a point where they  can index massive URL strings, it is best to avoid them if at all possible. For dynamic sites consider  utilizing mod rewrites to significantly clean up the URL to not only make it more search engine friendly,  but more user friendly as well.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:14;"&gt;&lt;b&gt;SUMMARY&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Basic website optimization is a critical component for successful placement in Google but is only  part of the overall picture. Stay tuned for "How to Optimize for Google - Part 2 of 3" where we will  discuss Links and Google Webmaster Tools.   &lt;/p&gt;  &lt;span style="color: rgb(204, 0, 0);font-family:Arial,Helvetica;font-size:16;"  &gt;&lt;b&gt;About The Author&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Scott Van Achte is the Senior SEO at StepForth Web Marketing Inc., based in Victoria, BC, Canada and founded  in 1997. You can read more of Scott's articles and those of the StepForth team at  &lt;a href="http://news.stepforth.com/" target="_blank"&gt;news.stepforth.com&lt;/a&gt; or contact us at  &lt;a href="http://www.stepforth.com/" target="_blank"&gt;StepForth.com&lt;/a&gt;, Tel - 250-385-1190, TollFree - 877-385-5526, Fax - 250-385-1198    &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-7707056334228296467?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/7707056334228296467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=7707056334228296467' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/7707056334228296467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/7707056334228296467'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/04/how-to-optimize-for-google-part-1-of-3.html' title='How to Optimize for Google: Part 1 of 3'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-8683847482636042361</id><published>2008-04-22T12:10:00.000+08:00</published><updated>2008-04-24T12:13:06.318+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Honda'/><category scheme='http://www.blogger.com/atom/ns#' term='Concept Car'/><category scheme='http://www.blogger.com/atom/ns#' term='Cool Stuff'/><category scheme='http://www.blogger.com/atom/ns#' term='CR-Z'/><category scheme='http://www.blogger.com/atom/ns#' term='Cool'/><title type='text'>Cool Cars - Honda CR-Z Cool Concept Car</title><content type='html'>&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2008/04/23/cool-stuff-honda-cr-z-cool-concept-car/" rel="bookmark" title="Read Cool Stuff: Honda CR-Z Cool Concept Car"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/h2&gt;      &lt;small class="date"&gt;      &lt;span class="date_day"&gt;&lt;/span&gt; &lt;/small&gt;&lt;img alt="Cool Stuff: Honda CR-Z Cool Concept Car - Cool Stuff, Automobile, Futute, Future car, Technology, Car Industry, Automotive, Creative,Honda CR-Z, Cool , Concept Car, Honda, Japan" id="image3381" src="http://www.pjlighthouse.com/wp-content/uploads/2008/04/honda-concept-car-crz-00.jpg" /&gt; &lt;br /&gt;Check out this amazing &lt;strong&gt;concept car&lt;/strong&gt; from &lt;strong&gt;Japan&lt;/strong&gt;.. the &lt;strong&gt;Honda CR-Z&lt;/strong&gt;&lt;br /&gt;&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2008/04/23/cool-stuff-honda-cr-z-cool-concept-car/" rel="bookmark" title="Read Cool Stuff: Honda CR-Z Cool Concept Car"&gt;Cool Stuff: Honda CR-Z Cool Concept Car&lt;/a&gt;&lt;/h2&gt; &lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-8683847482636042361?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/8683847482636042361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=8683847482636042361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8683847482636042361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8683847482636042361'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/04/cool-cars-honda-cr-z-cool-concept-car.html' title='Cool Cars - Honda CR-Z Cool Concept Car'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-3028777983339858004</id><published>2008-04-20T12:08:00.000+08:00</published><updated>2008-04-24T12:10:21.559+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='music'/><category scheme='http://www.blogger.com/atom/ns#' term='Photos'/><category scheme='http://www.blogger.com/atom/ns#' term='Joe  Cocker'/><category scheme='http://www.blogger.com/atom/ns#' term='Concert'/><title type='text'>You are so Beautiful by Joe Cocker</title><content type='html'>&lt;span&gt;You are so Beautiful Joe. My concert photos in a slideshow tribute to Mr. Cocker. 1999 from Clarkston Michigan.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/_fJxt0Cg52I&amp;hl=en&amp;color1=0x006699&amp;color2=0x54abd6"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/_fJxt0Cg52I&amp;hl=en&amp;color1=0x006699&amp;color2=0x54abd6" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-3028777983339858004?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/3028777983339858004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=3028777983339858004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/3028777983339858004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/3028777983339858004'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/04/you-are-so-beautiful-by-joe-cocker.html' title='You are so Beautiful by Joe Cocker'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-5844051404030504788</id><published>2008-04-04T04:47:00.000+08:00</published><updated>2008-04-11T04:50:47.257+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cool Bear'/><category scheme='http://www.blogger.com/atom/ns#' term='Sculptures'/><category scheme='http://www.blogger.com/atom/ns#' term='Horse'/><category scheme='http://www.blogger.com/atom/ns#' term='Matt Torrens'/><category scheme='http://www.blogger.com/atom/ns#' term='Bull Driftwood'/><title type='text'>Cool Bear, Horse &amp; Bull Driftwood Sculptures by Matt Torrens</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_cCmvObyemK4/R_59ek7oYeI/AAAAAAAAAOU/_fDC9CR065o/s1600-h/Drift-Wood-Art-Matt-Torrents-Sculptures-08.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_cCmvObyemK4/R_59ek7oYeI/AAAAAAAAAOU/_fDC9CR065o/s400/Drift-Wood-Art-Matt-Torrents-Sculptures-08.jpg" alt="" id="BLOGGER_PHOTO_ID_5187721785040724450" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Matt Torrens was &lt;/strong&gt;&lt;strong&gt;b&lt;/strong&gt;orn and raised in Calgary Alberta, Canada, growing up attending the Greatest Outdoor Show on Earth, the Calgary Stampede, and was inspired by the cowboy way of life. Be sure to check out my next show at the Grand National art show &amp;amp; sale at the Cow Palace in San Francisco, April 4th-12th. See more of his masterpiece below &lt;/p&gt;&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2008/04/10/art-amazing-bear-horse-bull-driftwood-sculptures-by-matt-torrens/" rel="bookmark" title="Read Art: Amazing Bear, Horse &amp;amp; Bull Driftwood Sculptures by Matt Torrens"&gt;Cool Bear, Horse &amp;amp; Bull Driftwood Sculptures by Matt Torrens&lt;/a&gt;&lt;/h2&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-5844051404030504788?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/5844051404030504788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=5844051404030504788' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5844051404030504788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5844051404030504788'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/04/cool-bear-horse-bull-driftwood.html' title='Cool Bear, Horse &amp; Bull Driftwood Sculptures by Matt Torrens'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_cCmvObyemK4/R_59ek7oYeI/AAAAAAAAAOU/_fDC9CR065o/s72-c/Drift-Wood-Art-Matt-Torrents-Sculptures-08.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-7144463267932906358</id><published>2008-04-01T04:45:00.000+08:00</published><updated>2008-04-11T04:47:53.406+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Health'/><category scheme='http://www.blogger.com/atom/ns#' term='knee'/><category scheme='http://www.blogger.com/atom/ns#' term='pain'/><title type='text'>Health: Knee pains</title><content type='html'>&lt;p&gt;&lt;strong&gt;What are the functions of the knee?&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;The knee joint has three parts. The thigh bone (femur) meets the large shin bone (tibia) forming the main knee joint. This joint has an inner (medial) and an outer (lateral) compartment. The kneecap (patella) joins the femur to form a third joint, called the patellofemoral joint.&lt;br /&gt;&lt;br /&gt;A joint capsule surrounds the knee joint with ligaments strapping the inside and outside of the joint (collateral ligaments) as well as crossing within the joint (cruciate ligaments). These ligaments provide stability and strength to the knee joint.&lt;br /&gt;&lt;br /&gt;The meniscus is a thickened cartilage pad between the two joints formed by the femur and tibia. The meniscus acts as a smooth surface for the joint to move on. Fluid-filled sacs called bursae, which serve as gliding surfaces that reduce friction of the tendons, surround the knee joint. Below the kneecap, there is a large tendon (patellar tendon) that attaches to the front of the tibia bone. The large muscles of the thigh move the knee. The knee also rotates slightly under guidance of specific muscles of the thigh. The knee functions to allow movement of the leg and is critical to normal walking and is a weight-bearing joint.&lt;br /&gt;&lt;br /&gt;&lt;a rel="nofollow" name="q62334947"&gt;&lt;/a&gt;&lt;b&gt;What injuries can cause knee pain? &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;An injury can affect any of the ligaments, bursae, or tendons surrounding the knee joint. The complexity of the design of the knee joint and the fact that it is an active weight-bearing joint are factors that make the knee one of the most commonly injured joints.&lt;br /&gt;&lt;br /&gt; &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;Ligament Injury&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Trauma can cause injury to the ligaments on the inner portion of the knee, the outer portion of the knee or within the knee. Injuries to these areas are noticed as immediate pain, but are sometimes difficult to localise. A collateral ligament injury is often associated with local tenderness over the area of the ligament involved. A ligament injury to the knee is usually painful at rest and may be swollen and warm. The pain can worsen by bending the knee, putting weight on the knee or walking. The severity of the injury can vary from mild (minor stretching or tearing of the ligament fibres, such as a low grade sprain) to severe (complete tear of the ligament fibres). Patients can have more than one area injured in a single traumatic event.&lt;br /&gt;&lt;br /&gt;Ligament injuries are initially treated with ice packs and immobilisation, with rest and elevation. It is generally initially recommended to avoid bearing weight on the injured joint and crutches may be required for walking. Some patients are placed in splints or braces to immobilise the joint to decrease pain and promote healing. Arthroscopic or open surgery may be necessary to repair severe injuries.&lt;br /&gt;&lt;br /&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;Meniscus tears&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The meniscus can be torn with the shearing forces of rotation that are applied to the knee during sharp, rapid motions. This is especially common in sports requiring reaction body movements. There is a higher incidence with aging and degeneration of the underlying cartilage. More than one tear can be present in an individual meniscus. The patient with a meniscal tear may have a rapid onset of a popping sensation with a certain activity or movement of the knee. Occasionally, it is associated with swelling and warmth in the knee. It is often associated with locking or unstable sensation in the knee joint. The meniscal tear can be diagnosed in one of three ways: arthroscopy, arthrography, or an MRI.&lt;br /&gt;&lt;br /&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;Tendinitis&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Tendinitis is an inflammation of the tendon, which is often produced by a strain event, such as jumping. Tendinitis is diagnosed based on the presence of pain and tenderness localised to the tendon. It is treated with a combination of ice packs, immobilisation with a knee brace as needed, rest, and anti-inflammatory medications. In severe cases, surgery may be required. Surgical repair of the ruptured tendon is often necessary.&lt;br /&gt;&lt;br /&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;Fractures&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With severe knee trauma, such as motor vehicle accidents, bone breakage (fracture) of any of the three bones of the knee can occur. Bone fractures within the knee joint can be serious and can require surgical repair as well as immobilisation with casting or other supports.&lt;/li&gt;&lt;/ol&gt;&lt;a rel="nofollow" name="q62334943"&gt;&lt;/a&gt;&lt;b&gt;What diseases and conditions can cause knee pain? &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Knee pain can also be caused due to diseases or conditions that involve the knee joint, the soft tissues and the bones surrounding the knee, or the nerves that supply sensation to the knee area.&lt;br /&gt;&lt;br /&gt; &lt;ul&gt;&lt;li&gt;&lt;b&gt;Arthritis&lt;/b&gt; is the inflammation within a joint. The causes of knee joint inflammation range from non-inflammatory types of arthritis such as osteoarthritis, which is a degeneration of the cartilage of the knee, to inflammatory types of arthritis (rheumatoid arthritis or gout). Treatment of the various type of arthritis is directed towards the specific type of arthritis.&lt;br /&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;Chondromalacia&lt;/b&gt; refers to the softening of the cartilage under the kneecap (patella). It is a common cause of deep knee pain and stiffness in younger women and can be associated with pain and stiffness after prolonged sitting and climbing stairs or hills. While treatment with anti-inflammatory medications, ice packs, and rest can help, long-term relief is best achieved by strengthening exercises for the muscles of the front of the thigh.&lt;br /&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;Bursitis&lt;/b&gt; of the knee commonly occurs on the inside of the knee and the front of the kneecap. Bursitis is generally treated with ice packs, immobilisation, and anti-inflammatory medications and may require local injections of corticosteroids as well as exercise therapy to develop the musculature of the front of the thigh.&lt;br /&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;Infections of the bone&lt;/b&gt; or joint can rarely be a serious cause of knee pain. They do have associated signs of infection including fever, extreme heat, warmth of the joint, chills of the body, and may be associated with puncture wounds in the area around the knee.&lt;br /&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;Tumours&lt;/b&gt; involving the joint are extremely rare. They can cause problems with local pain.&lt;br /&gt; &lt;/li&gt;&lt;li&gt;The collateral ligament on the inside of the knee joint can become calcified and is referred to as Pellegrini-Stieda syndrome. With this condition, the knee can become inflamed and can be treated conservatively with ice packs, immobilisation and rest.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-7144463267932906358?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/7144463267932906358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=7144463267932906358' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/7144463267932906358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/7144463267932906358'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/04/health-knee-pains.html' title='Health: Knee pains'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-5828189544266006997</id><published>2008-03-25T00:20:00.000+08:00</published><updated>2008-03-31T00:29:14.201+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Healthy Lifestyle'/><category scheme='http://www.blogger.com/atom/ns#' term='Convicting'/><category scheme='http://www.blogger.com/atom/ns#' term='Miracle'/><category scheme='http://www.blogger.com/atom/ns#' term='care'/><category scheme='http://www.blogger.com/atom/ns#' term='Mr T'/><category scheme='http://www.blogger.com/atom/ns#' term='Amazing'/><category scheme='http://www.blogger.com/atom/ns#' term='Love Story'/><title type='text'>Former The A-Team,Mr. T brings coma boy back to conscious</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_cCmvObyemK4/R--_gul3-fI/AAAAAAAAANE/KIskqeTzCWk/s1600-h/mr-t-brought-boy-coma.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_cCmvObyemK4/R--_gul3-fI/AAAAAAAAANE/KIskqeTzCWk/s400/mr-t-brought-boy-coma.jpg" alt="" id="BLOGGER_PHOTO_ID_5183572265110338034" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p class="first"&gt;&lt;span style="font-weight: bold;"&gt;Former The A-Team &lt;/span&gt;star &lt;span style="font-weight: bold;"&gt;Mr. T&lt;/span&gt; once stunned a sick child's family by bringing him out of a coma - after &lt;a href="http://uk.news.yahoo.com/fc/nhs.html"&gt;doctors&lt;/a&gt; begged the actor for help.&lt;!--3pacID:33270--&gt;&lt;script language="javascript"&gt; if(window.yzq_d==null)window.yzq_d=new Object(); window.yzq_d['oaf1kFf4aho-']='&amp;U=13k18pb1l%2fN%3doaf1kFf4aho-%2fC%3d200102747.201642096.202876204.200578085%2fD%3dLREC%2fB%3d200787048';&lt;/script&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The poorly kid fell unconscious in Detroit, Michigan in the mid-1980s - and the only physical movement he made was in response to hearing Mr. T's name.&lt;/p&gt;&lt;p&gt;And when the mohawked star was in town, he stopped by the hospital to visit the ill boy - with miraculous results.&lt;/p&gt;&lt;p&gt;He tells Empire magazine, "His family put toys around him and one of them was a Mr. T doll. And whenever my name came up, the boy moved his arm.&lt;/p&gt;&lt;p&gt;"Somebody told the doctors I was in town, so they called me down there. I closed the curtains and prayed. Then, as I was walking down the hall, the kid suddenly came out of the coma and hollered out.&lt;/p&gt;&lt;p&gt;"That was my supernatural moment."&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-5828189544266006997?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/5828189544266006997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=5828189544266006997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5828189544266006997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/5828189544266006997'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/03/former-a-teammr-t-brings-coma-boy-back.html' title='Former The A-Team,Mr. T brings coma boy back to conscious'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_cCmvObyemK4/R--_gul3-fI/AAAAAAAAANE/KIskqeTzCWk/s72-c/mr-t-brought-boy-coma.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-8806449465926765545</id><published>2008-03-21T04:52:00.003+08:00</published><updated>2008-03-21T04:56:01.684+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LyricsBecause'/><category scheme='http://www.blogger.com/atom/ns#' term='Touching'/><category scheme='http://www.blogger.com/atom/ns#' term='Girl'/><category scheme='http://www.blogger.com/atom/ns#' term='KISS'/><category scheme='http://www.blogger.com/atom/ns#' term='music'/><category scheme='http://www.blogger.com/atom/ns#' term='MTV'/><category scheme='http://www.blogger.com/atom/ns#' term='Love Story'/><title type='text'>Love Music: Because I’m A Girl by KISS MTV &amp; Lyrics</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.pjlighthouse.com/2008/03/20/music-because-im-a-girl-by-kiss-a-very-touching-love-story/"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_cCmvObyemK4/R-LPIel3-eI/AAAAAAAAAM8/j2EA-MaXbc4/s400/KISS-Because-im-a-girl-korean-music-mtv.jpg" alt="" id="BLOGGER_PHOTO_ID_5179930265987316194" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;     &lt;small class="date"&gt;      &lt;/small&gt;A very touching &lt;strong&gt;Love story&lt;/strong&gt; &lt;strong&gt;Music Video &lt;/strong&gt;by &lt;strong&gt;KISS&lt;/strong&gt; titled “&lt;strong&gt;Because I’m A Girl&lt;/strong&gt;“… must watch! Watch the MTV here... &gt;&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;a href="http://www.pjlighthouse.com/2008/03/20/music-because-im-a-girl-by-kiss-a-very-touching-love-story/" rel="bookmark" title="Read Music: Because I’m A Girl by KISS a very Touching Love Story…"&gt;Music: Because I’m A Girl by KISS a very Touching Love Story&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tags&lt;/span&gt;: &lt;a href="http://technorati.com/tag/MTV" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt;MTV&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Music" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Music&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Lyrics" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Lyrics&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Korean" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Korean&lt;/a&gt;, &lt;a href="http://technorati.com/tag/KISS" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; KISS&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Pop" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Pop&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Love" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Love&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Song" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Song&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Sacrifice" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Sacrifice&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Love+Song" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Love Song&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Music+Video" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Music Video&lt;/a&gt;, &lt;a href="http://technorati.com/tag/YouTube" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; YouTube&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Touching" rel="tag" onclick="javascript:urchinTracker ('/outbound/article/technorati.com');"&gt; Touching&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-8806449465926765545?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/8806449465926765545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=8806449465926765545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8806449465926765545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8806449465926765545'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/03/love-music-because-im-girl-by-kiss-mtv.html' title='Love Music: Because I’m A Girl by KISS MTV &amp; Lyrics'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_cCmvObyemK4/R-LPIel3-eI/AAAAAAAAAM8/j2EA-MaXbc4/s72-c/KISS-Because-im-a-girl-korean-music-mtv.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-8568625468619403583</id><published>2008-03-06T15:57:00.003+08:00</published><updated>2008-03-06T16:01:20.875+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Petaling Jaya'/><category scheme='http://www.blogger.com/atom/ns#' term='sbread'/><category scheme='http://www.blogger.com/atom/ns#' term='SBREADVERAGE'/><category scheme='http://www.blogger.com/atom/ns#' term='Food'/><category scheme='http://www.blogger.com/atom/ns#' term='mid valley'/><category scheme='http://www.blogger.com/atom/ns#' term='malaysia'/><title type='text'>SBREAD opening at The Gardens Mid Valley</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_cCmvObyemK4/R8-kX2CgU0I/AAAAAAAAAME/dg_dloykgkM/s1600-h/SBbread_mid_valley_Petaling_jaya.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_cCmvObyemK4/R8-kX2CgU0I/AAAAAAAAAME/dg_dloykgkM/s400/SBbread_mid_valley_Petaling_jaya.jpg" alt="" id="BLOGGER_PHOTO_ID_5174535226421957442" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SBread&lt;/span&gt; is now open at the &lt;span style="font-weight: bold;"&gt;Gardens Mid Valley&lt;/span&gt; in &lt;span style="font-weight: bold;"&gt;Petaling Jaya&lt;/span&gt;..&lt;br /&gt;&lt;br /&gt;Check out their promo...&lt;br /&gt;&lt;br /&gt;We are now SBREADing at The Gardens Mid Valley, lower ground.&lt;br /&gt;Come down today and taste our original &amp;amp; tasty breads, topped up with&lt;br /&gt;unique recipes of spreads.&lt;br /&gt;&lt;br /&gt;Not just another Toast &amp;amp; Kaya coffeeshop...&lt;br /&gt;SBREAD's like no other in Malaysia...&lt;br /&gt;&lt;br /&gt;At SBREAD.....&lt;br /&gt;Pick a BREAD (3 special choices)&lt;br /&gt;Pick a SPREAD (9 original delicious recipes)&lt;br /&gt;Complete... with a SBREADVERAGE (check out the "Pink" Barley and Iced Thai Tea)&lt;br /&gt;&lt;br /&gt;Original, Tasty and Healthy in every serve. Freshly Made Daily.....&lt;br /&gt;&lt;br /&gt;Everyone has a favourite sbread...U just.can't sbread enough!!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Pls share this with all your friends...Thx many many!&lt;br /&gt;&lt;br /&gt;www.sbread.com&lt;br /&gt;facebook: http://www.facebook.com/pages/SBREAD/21445808800&lt;br /&gt;&lt;br /&gt;sbread.gardens@gmail.com&lt;br /&gt;t: +603-22832929, f:+603-22832229&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-8568625468619403583?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/8568625468619403583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=8568625468619403583' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8568625468619403583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8568625468619403583'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/03/sbread-opening-at-gardens-mid-valley.html' title='SBREAD opening at The Gardens Mid Valley'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_cCmvObyemK4/R8-kX2CgU0I/AAAAAAAAAME/dg_dloykgkM/s72-c/SBbread_mid_valley_Petaling_jaya.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-132761794535954553</id><published>2008-03-06T10:36:00.001+08:00</published><updated>2008-03-06T10:50:05.411+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dog'/><category scheme='http://www.blogger.com/atom/ns#' term='crazy funny'/><title type='text'>2 in one day!!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_cCmvObyemK4/R89bxmCgUyI/AAAAAAAAAL0/YgpCS0VoddM/s1600-h/9%2803-03-01-07-12%29.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_cCmvObyemK4/R89bxmCgUyI/AAAAAAAAAL0/YgpCS0VoddM/s400/9%2803-03-01-07-12%29.jpg" alt="" id="BLOGGER_PHOTO_ID_5174455404454761250" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-132761794535954553?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/132761794535954553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=132761794535954553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/132761794535954553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/132761794535954553'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/03/2-in-one-day.html' title='2 in one day!!'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_cCmvObyemK4/R89bxmCgUyI/AAAAAAAAAL0/YgpCS0VoddM/s72-c/9%2803-03-01-07-12%29.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-8166047776516761667</id><published>2008-02-28T10:33:00.001+08:00</published><updated>2008-02-28T10:40:27.451+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='EFFECTS'/><category scheme='http://www.blogger.com/atom/ns#' term='COLD WATER'/><category scheme='http://www.blogger.com/atom/ns#' term='DANGER'/><category scheme='http://www.blogger.com/atom/ns#' term='HEALTH RISKS'/><title type='text'>HEALTH RISKS - EFFECTS OF COLD WATER</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_cCmvObyemK4/R8YewQ2wTNI/AAAAAAAAAKs/Wc8nmR6z-dE/s1600-h/lungs-health-drink-cold-water-bad-effects.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp1.blogger.com/_cCmvObyemK4/R8YewQ2wTNI/AAAAAAAAAKs/Wc8nmR6z-dE/s400/lungs-health-drink-cold-water-bad-effects.jpg" alt="" id="BLOGGER_PHOTO_ID_5171855036588772562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;. &lt;br /&gt;For those who like to drink cold water, this article is applicable to you. It is nice to have a cup of cold drink after a meal. However, the cold water will solidify the oily stuff that you have just consumed. It will slow down the digestion. Once this 'sludge' reacts with the acid, it will break down and be absorbed by the intestine faster than the solid food. It will line the intestine. Very soon, this will turn into fats and lead to cancer. It is best to drink hot soup or warm water after a meal.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A serious note about heart attacks - You should know that not every heart attack symptom is going to be the left arm hurting. Be aware of intense pain in the jaw line.&lt;br /&gt;&lt;br /&gt;You may never have the first chest pain during the course of a heart attack. Nausea and intense sweating are also common symptoms. 60% of people who have a heart attack while they are asleep do not wake up. Pain in the jaw can wake you from a sound sleep. Let's be careful and be aware. The more we know the better chance we could survive.&lt;br /&gt;&lt;br /&gt;A cardiologist says if everyone who reads this message sends it to 10 people, you can be sure that we'll save at least one life. Read this &amp;amp; Send the link to a friend. It could save a life. So, please be a true friend and send this article to all your friends you care about.&lt;br /&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-8166047776516761667?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/8166047776516761667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=8166047776516761667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8166047776516761667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/8166047776516761667'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/02/health-risks-effects-of-cold-water.html' title='HEALTH RISKS - EFFECTS OF COLD WATER'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_cCmvObyemK4/R8YewQ2wTNI/AAAAAAAAAKs/Wc8nmR6z-dE/s72-c/lungs-health-drink-cold-water-bad-effects.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-2203223381798358757</id><published>2008-02-27T15:08:00.001+08:00</published><updated>2008-02-27T15:18:12.551+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Internet Marketing'/><category scheme='http://www.blogger.com/atom/ns#' term='Marketing'/><category scheme='http://www.blogger.com/atom/ns#' term='Patric Chan'/><category scheme='http://www.blogger.com/atom/ns#' term='bonue'/><category scheme='http://www.blogger.com/atom/ns#' term='SEO'/><category scheme='http://www.blogger.com/atom/ns#' term='Niche'/><title type='text'>Patric Chan - Niche Marketing 2.0</title><content type='html'>&lt;object height="355" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/s50mbiDj_a8&amp;amp;rel=1"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/s50mbiDj_a8&amp;amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" height="355" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Patric Chan explaining about his new product Niche Marketing 2.0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-2203223381798358757?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/2203223381798358757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=2203223381798358757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/2203223381798358757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/2203223381798358757'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/02/patric-chan-niche-marketing-20.html' title='Patric Chan - Niche Marketing 2.0'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-1476885467422781705</id><published>2008-02-02T20:02:00.000+08:00</published><updated>2008-02-11T20:07:09.712+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='funny'/><category scheme='http://www.blogger.com/atom/ns#' term='Adsense'/><category scheme='http://www.blogger.com/atom/ns#' term='advertisement'/><title type='text'>Some great ads photo - breaking glasses!</title><content type='html'>&lt;div style="font-size: 12pt; font-family: times new roman,new york,times,serif;"&gt; &lt;div&gt; &lt;div align="center"&gt;&lt;a rel="nofollow" target="_blank" href="http://groups.yahoo.com/group/pcworld"&gt;&lt;img alt="Sent by Tuna" src="http://img169.imageshack.us/img169/7581/29012008082169200120160ib0.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;br /&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;a rel="nofollow" target="_blank" href="http://groups.yahoo.com/group/BlueDanube/join"&gt;&lt;img alt="Sent by Tuna" src="http://img512.imageshack.us/img512/2130/29012008082314500120160pk7.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;br /&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;a rel="nofollow" target="_blank" href="http://groups.yahoo.com/group/BlueDanube/join"&gt;&lt;img alt="Sent by Tuna" src="http://img257.imageshack.us/img257/4346/29012008083737100120160ta7.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;br /&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;a rel="nofollow" target="_blank" href="http://groups.yahoo.com/group/BlueDanube/join"&gt;&lt;img alt="Sent by Tuna" src="http://img214.imageshack.us/img214/1810/29012008083829700120160uh1.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;a rel="nofollow" target="_blank" href="http://groups.yahoo.com/group/BlueDanube/join"&gt;&lt;img alt="Sent by Tuna" src="http://img260.imageshack.us/img260/9066/29012008083012800120160ho3.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;br /&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;a rel="nofollow" target="_blank" href="http://groups.yahoo.com/group/BlueDanube/join"&gt;&lt;img alt="Sent by Tuna" src="http://img442.imageshack.us/img442/9629/29012008082449500120160mb4.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;br /&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;a rel="nofollow" target="_blank" href="http://groups.yahoo.com/group/BlueDanube/join"&gt;&lt;img alt="Sent by Tuna" src="http://img259.imageshack.us/img259/3729/29012008083977900120160ac7.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="center"&gt;&lt;br /&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;a rel="nofollow" target="_blank" href="http://groups.yahoo.com/group/BlueDanube/join"&gt;&lt;img alt="Sent by Tuna" src="http://img352.imageshack.us/img352/7906/29012008085210500120160nw6.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;br /&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;a rel="nofollow" target="_blank" href="http://groups.yahoo.com/group/BlueDanube/join"&gt;&lt;img alt="Sent by Tuna" src="http://img257.imageshack.us/img257/6290/29012008078818900120160et2.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;br /&gt; &lt;/div&gt; &lt;div align="center"&gt;&lt;a rel="nofollow" target="_blank" href="http://groups.yahoo.com/group/BlueDanube/join"&gt;&lt;img alt="Sent by Tuna" src="http://img352.imageshack.us/img352/1310/29012008085663500120160an2.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt; &lt;div align="center"&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-1476885467422781705?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/1476885467422781705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=1476885467422781705' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/1476885467422781705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/1476885467422781705'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/02/some-great-ads-photo-breaking-glasses.html' title='Some great ads photo - breaking glasses!'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-6076552985951892882</id><published>2008-01-28T10:01:00.000+08:00</published><updated>2008-01-31T10:12:13.450+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SEO Mythology'/><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><category scheme='http://www.blogger.com/atom/ns#' term='Adsense'/><category scheme='http://www.blogger.com/atom/ns#' term='Debunking'/><category scheme='http://www.blogger.com/atom/ns#' term='By Matt Foster'/><title type='text'>Debunking SEO Mythology by By Matt Foster</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_cCmvObyemK4/R6EubdIoexI/AAAAAAAAAI0/vF6rGlLs-K8/s1600-h/debunking-seo.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_cCmvObyemK4/R6EubdIoexI/AAAAAAAAAI0/vF6rGlLs-K8/s400/debunking-seo.jpg" alt="" id="BLOGGER_PHOTO_ID_5161457697155480338" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Google&lt;/span&gt; especially has cracked down hard on paid links in the last few months. To put it succinctly, they don't pass page rank. If you want to buy a link from a site, only do it if you believe the link itself will be a good source of traffic -- in other words, only do it for legitimate advertising purposes. Do not do it if your purpose is for that link to transfer page rank or increase your ranking, as it likely will not.&lt;br /&gt;&lt;br /&gt;&lt;p class="story-body"&gt;In Greek mythology, the Hydra was a creature who could not be defeated, as each time one of its heads was cut off, two more would sprout back in its place. It seems that SEO mythology is no different; every time one SEO myth is debunked, two more SEO myths crop back up in its place, only adding to the confusion about search engine optimization.&lt;/p&gt; &lt;span name="intelliTxt" id="intelliTxt"&gt;&lt;p&gt;Hercules was able to defeat the Hydra by cutting off its heads and then burning the stumps before new heads could grow back. What SEO needs is a hero, an SEO Hercules, to come and save us from the Hydra of SEO Mythology. Let's go through some of the more pervasive SEO myths and see if we can put a torch to them.&lt;/p&gt; &lt;h2 class="subhead"&gt; Get the Facts &lt;/h2&gt; &lt;p&gt; &lt;strong&gt;Myth:&lt;/strong&gt; All I need to do is figure out the magic bullet, and I will be at the top of the search engines.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Fact:&lt;/strong&gt; Search engines use over 200 factors to rank sites. No one factor will get you to the top. To get to the top, you must have a balanced search engine strategy encompassing many factors, both on page and off page. There is no magic bullet.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Myth:&lt;/strong&gt; Search rankings are about link popularity. Get as many links as you can. Join Web rings, "free for all" (FFA) link exchanges, and get as many sites as you can to link to you through reciprocal linking back to them.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Fact:&lt;/strong&gt; While link popularity is important if done correctly, &lt;a href="http://www.google.com/" onclick="window.open('http://www.google.com'); return false;"&gt;Google&lt;/a&gt; (Nasdaq: GOOG)  is placing links under increasing scrutiny, and sheer volumes of inbound linking without regard to the source of the link and other factors hasn't worked in years. It is not the raw number of links that matter, but the type of links. Links from trusted sites, relevant to your industry, with proper anchor text and relevant surrounding text and page content, to original content on your site are the ones that will help you.&lt;/p&gt; &lt;p&gt;FFA linking will most likely get you in trouble with the engines as they could interpret that as an attempt to spam the results. In addition to bleeding away all of your page rank to other sites, FFA linking will increase your chances of linking to a "bad neighborhood," another thing which can get you into trouble. Never link to sites you do not know or with which you are not familiar. Remember, Google is smarter than you, you can't fool them with unnatural linking schemes.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Myth:&lt;/strong&gt; It's all about "keyword density." Be sure to repeat your keyword numerous times on your Web site. Keyword repetition increases keyword density and inflates your search engine ranking.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Fact:&lt;/strong&gt; Structuring your page around some magic formula for key phrase density does nothing for you. Yes, your target key phrases should be included at least once on the page, as well as in your title and meta description elements, and in an H1 or H2 tag if possible. Other than that, forget about key phrase density. Create your Web content for human readers and write it so it makes sense to them. Whatever you do, avoid key phrase repetition, a known spamming technique sure to get you into trouble. &lt;/p&gt; &lt;h2 class="subhead"&gt; Increasing Your Odds &lt;/h2&gt; &lt;p&gt; &lt;strong&gt;Myth:&lt;/strong&gt; Repeated submissions to the search engines increase your rankings. It is a good idea to sign up for an automated submission service, which will regularly resubmit your site to 1,000 or more search engines each week.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Fact:&lt;/strong&gt; Automated submissions are a violation of major search engines' Terms of Inclusion and can get you into trouble. Search engines don't need you to submit to them, set up a blog and get a few links to your site, and they will find you very quickly. Using Blogger.com, which is owned by Google, usually can get a new site indexed within a week. Just be sure to put a link on the blog to your site.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Myth:&lt;/strong&gt; The meta keywords tag must include your target keywords. Search engines place heavy weight on this tag and use it to determine which keywords for which to rank your site.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Fact:&lt;/strong&gt; Search engines that matter, such as Google, place zero weight on the keywords meta element due to historical spam.  &lt;a href="http://www.yahoo.com/" onclick="window.open('http://www.yahoo.com'); return false;"&gt;Yahoo&lt;/a&gt;  appears to give it some small weight. In any event, use of the keyword meta element is of so little use, many SEO's ignore it altogether. &lt;/p&gt; &lt;h2 class="subhead"&gt; &lt;/h2&gt; &lt;p&gt; &lt;strong&gt;Myth:&lt;/strong&gt; Because links are so important to search rankings, I should go out and purchase a large number of paid links and submit to hundreds or thousands of directories in order to get more links to my site.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Fact:&lt;/strong&gt; Google especially has cracked down hard on paid links in the last few months. To put it succinctly, they don't pass page rank. If you want to buy a link from a site, only do it if you believe the link itself will be a good source of traffic (in other words, only do it for legitimate &lt;span id="nointelliTXT"&gt;advertising&lt;/span&gt; purposes). Do not do it if your purpose is for that link to transfer page rank or increase your ranking, as it likely will not.&lt;/p&gt; &lt;p&gt;Additionally, hundreds of useless directories have been harshly penalized as well, so that links from within them are either not counted at all or given very little weight. Get links from a few well respected directories such as dmoz.org, Yahoo directory, Business.com, JoeAnt and others which have a manual review process. Automated submission services which submit to hundreds of directories are a waste of money.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Myth:&lt;/strong&gt; I should write articles and submit them to article directories, because links from article directories have high page rank and are given great weight by the engines.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Fact:&lt;/strong&gt; Article directory links in and of themselves carry little to no weight. The engines are smart and know that people spam these directories with useless content just to get a link. If you want to get relevant, trusted links to your site that actually mean something, create useful, informative, or educational content that people will want to link to. Articles are one form of such content, but only if they are good enough to get picked up by other sites. Other content which can serve as link bait is video content, tools and widgets, product reviews, top 10 lists, and interesting or entertaining blogs.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17795373-6076552985951892882?l=maverickchen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://maverickchen.blogspot.com/feeds/6076552985951892882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17795373&amp;postID=6076552985951892882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/6076552985951892882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17795373/posts/default/6076552985951892882'/><link rel='alternate' type='text/html' href='http://maverickchen.blogspot.com/2008/01/debunking-seo-mythology-by-by-matt.html' title='Debunking SEO Mythology by By Matt Foster'/><author><name>maverickchen</name><uri>http://www.blogger.com/profile/14602209876938600987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_cCmvObyemK4/R1f1E71n2EI/AAAAAAAAAGA/CfOX_emjjUg/S220/maverickchen_avatar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_cCmvObyemK4/R6EubdIoexI/AAAAAAAAAI0/vF6rGlLs-K8/s72-c/debunking-seo.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17795373.post-3973496835576464386</id><published>2008-01-28T09:48:00.000+08:00</published><updated>2008-01-31T09:49:40.825+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Health'/><category scheme='http://www.blogger.com/atom/ns#' term='Healthy Lifestyle'/><category scheme='http://www.blogger.com/atom/ns#' term='Life'/><category scheme='http://www.blogger.com/atom/ns#' term='Food'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><category scheme='http://www.blogger.com/atom/ns#' term='Self Development'/><title type='text'>Some Important notice regarding Health</title><content type='html'>&lt;small class="date"&gt;&lt;span class="date_year"&gt;&lt;/span&gt;&lt;/small&gt;&lt;img alt="exercise, health, healthy-lifestyle, life, self-development" id="image2842" src="http://www.pjlighthouse.com/wp-content/uploads/2008/01/health-wellness-important-apple-message-pjlighthouse.jpg" /&gt;&lt;br /&gt;Some Important notice for your health.. Read on to learn more.. &lt;p&gt;少喝奶茶;&lt;br /&gt;Reduce volume of tea intake;&lt;/p&gt; &lt;p&gt;不吃 刚烤的面包;&lt;br /&gt;Do not eat bread which has JUST been toasted;&lt;/p&gt; &lt;p&gt;远离充 手机电源 ;&lt;br /&gt;Stay a distance from your charger;&lt;/p&gt; &lt;p&gt;白天多喝水,晚上少喝;&lt;br /&gt;Drink more water in the morning, less at night;&lt;br /&gt;一天 不喝多于两杯咖啡;&lt;br /&gt;Do not drink coffee twice a day;&lt;/p&gt; &lt;p&gt;少吃油多的食物;&lt;br /&gt;Reduce your volume of oily food;&lt;/p&gt; &l
