After we did an UPDATE on a record and when we want to find out what are updated, we will usually follow up with a SELECT. Example,
Age = Age + 1, LastModifiedDate = GETDATE()
where Name = 'Name 1'
select * from tblTest
where Name = 'Name 1'
How about doing the above all in one single statement and avoiding the select statement from getting outdated record when someone intercepts and attempts to update?
It's possible! Try the following.
if ISNULL(object_id('tblTest'),0)<>0 drop table tblTest
create table tblTest (
ID int identity(1,1) not null primary key,
Name varchar(255) not null,
Age tinyint not null,
LastModifiedDate datetime not null default getdate()
--INSERT test records
insert into tblTest (Name, Age) values ('Name 1', 21)
insert into tblTest (Name, Age) values ('Name 2', 22)
--CREATE the temp table for select
Google Docs has launched a revolutionary spell checker - one that not only correct spellings, but also is contextual. This contextual spell checker is able to make suggestions on the correct use of word based on the sentence. What's even better is the suggestions get smarter and smarter based on the words Googlebot sees as it explores the web.
The advantages spelled out are as follows: Suggestions are contextual. For example, the spell checker is now smart enough to know what you mean if you type “Icland is an icland.”
Contextual suggestions are made even if the misspelled word is in the dictionary. If you write “Let’s meat tomorrow morning for coffee” you’ll see a suggestion to change “meat” to “meet."
Suggestions are constantly evolving. As Google crawls the web, we see new words, and if those new words become popular enough they’ll automatically be included in our spell checker—even pop culture terms, like Skrillex.
Amazon is reported to be acquiring robotics firm Kiva Systems for $755 million in cash. Saving a little time can save a lot of money for Amazon, making robots move inventory items, instead of the workers, and fulfilling orders faster.
An "Etch A Sketch" Romney campaign gaffe is spreading around the Internet like wildfire. The comment that sparked controversial debate is as quote:
Everything changes. It's like Etch A Sketch. You can shake it up and we start all over again.
Soon after the comment, several political rivals including the Democrats seized the opportunity to attack Romney. Democrats even produced a YouTube clip entitled "Mitt Romney: Some Things You Can't Shake Off".
Subject to declaration by the Board of Directors, the Company plans to initiate a quarterly dividend of $2.65 per share sometime in the fourth quarter of its fiscal 2012, which begins on July 1, 2012.
Additionally, the Company’s Board of Directors has authorized a $10 billion share repurchase program commencing in the Company’s fiscal 2013, which begins on September 30, 2012. The repurchase program is expected to be executed over three years, with the primary objective of neutralizing the impact of dilution from future employee equity grants and employee stock purchase programs.
This would means Apple will be spending approximately $45 billion of its $97 billion cash reserves on dividends and share buyback in the first three years of these new programs. For your in…
I believe many have been experiencing similar annoyances on Facebook, been tagged in a photo inappropriately randomly. To avoid that, read on here to learn how to control Facebook photo tags and how to manage your privacy settings so it doesn't happen again.
Google doesn't sell content in all countries, so here's the rundown on what Google Play will offer depending on where you are: US: Apps, Movies, Books, MusicUK & Canada: Apps, Movies, BooksAustralia: Apps & BooksJapan: Apps & MoviesOthers: Apps
Here it is by content type: Apps: US, UK, Canada, Australia, Japan and many other countries (not all countries can buy apps)Books: US, UK, Canada, AustraliaMovies: US, UK, Canada, JapanMusic: US
I have been receiving several unsolicited emails from Tan Kin Lian these days, many early ones do not come with unsubscribe option, and latter ones do have an unsubscribe option but aren't working at all.
Ironically, the company is offering EDM service as a business. Oops..
Singapore's Deputy Prime Minister and Finance Minister, Tharman Shanmugaratnam, comment made in parliament on Thursday that household of income as low as $1,000 is now able to buy a flat has sparked an outrage among Singaporeans online.
Tharman's comment in response to NCMP Gerald Giam about Singaporeans being unable to afford a flat:
I would like to assure Mr Gerald Giam, who might not have caught up with all the developments, that our enhanced housing grants for lower income families are such that a family with a monthly income of as low as $1,000 can now purchase a small flat. 98% of our younger cohorts, those who are below 35, earn at least $1,000 of income a month. A family that earns a bit more, say $1500, can purchase a medium-sized flat.
DPM Tharman's budget speech can be found here.
So how is this possible?
Today, National Development Minister Khaw Boon Wan came out to clarify the comment made by DPM Tharman. Similarly, Minister of State in the Ministry of National…
Google has put up a challenge to all hackers - up to $1 million rewards and one free Chromebook if someone finds a bug on its Chrome.
The aim of our sponsorship is simple: we have a big learning opportunity when we receive full end-to-end exploits. Not only can we fix the bugs, but by studying the vulnerability and exploit techniques we can enhance our mitigations, automated testing, and sandboxing. This enables us to better protect our users.
While we’re proud of Chrome’s leading track record in past competitions, the fact is that not receiving exploits means that it’s harder to learn and improve. To maximize our chances of receiving exploits this year, we’ve upped the ante. We will directly sponsor up to $1 million worth of rewards in the following categories: $60,000 - “Full Chrome exploit”: Chrome / Win7 local OS user account persistence using only bugs in Chrome itself.
$40,000 - “Partial Chrome exploit”: Chrome / Win7 local OS user account persistence using at least one bug in Chro…