About Me
- Kamal's Blog
- Colombo, Sri Lanka
- Professional Report/ Technical/ Blog/ Academic and Ghost Article Writer,Application Developer, Database Administrator, Content Creator and Project Manager in a wide variety of business & enterprise applications. Particularly interested in client/server and relational database design using MS-SQL Server & Oracle. Always interested in new hi-tech projects, as well as close interaction with the DB querying & reporting. Also a specialist in Education Management. Actively seeking the processes for merging Enterprise Lean Sigma (ELS) with IT.
Tuesday, 30 November 2010
10 gifts to give your development team this holiday season
Show your developers how much you appreciate their hard work and loyalty by choosing from this list of gift ideas. Some are more tangible than others -- and some won't cost you a dime. view
Ten Quick Windows Phone 7 Tips and Tricks
I have disseminated the most useful tips into a handy list below. Here they are:
1. Press and hold the Start button to access voice controls
2. Sync Windows Phone 7 with Outlook (sort of)
3. To quickly hard reset, hold volume up and down during phone startup.
4. When flipping through photos, pinch to zoome out to film-strip view.
5. When pinning a website to your Start screen from IE, the zoom level determines the picture used for the tile. So, zoom into the website's logo to get a more accurate photo.
6. When connected to headphones, you can change the volume without turning on the screen.
7. If you want to silence your phone and ignore a call when it comes through, tap the power button while the phone is ringing.
8. Tap and hold in about 25 places to bring up hidden options.
9. Use your device as portable storage (difficult).
10. Use wireless sync from Zune software to send multimedia wirelessly to your phone.
Microsoft said last week that nearly 3,000 apps are now available in the Windows Phone Marketplace.
1. Press and hold the Start button to access voice controls
2. Sync Windows Phone 7 with Outlook (sort of)
3. To quickly hard reset, hold volume up and down during phone startup.
4. When flipping through photos, pinch to zoome out to film-strip view.
5. When pinning a website to your Start screen from IE, the zoom level determines the picture used for the tile. So, zoom into the website's logo to get a more accurate photo.
6. When connected to headphones, you can change the volume without turning on the screen.
7. If you want to silence your phone and ignore a call when it comes through, tap the power button while the phone is ringing.
8. Tap and hold in about 25 places to bring up hidden options.
9. Use your device as portable storage (difficult).
10. Use wireless sync from Zune software to send multimedia wirelessly to your phone.
Microsoft said last week that nearly 3,000 apps are now available in the Windows Phone Marketplace.
Most Expensive Spirits in the World
10. $5,500 – Jenssen Arcana
Aged 98 years in Oak barrels, Jenssen’s Arcana is powerful, “ extraordinarily” concentrated and only bottled, sealed and certified upon request.
9. $6,000 – Hine Triomphe Talent De Thomas Hine Crystal Decanter
8. $6,400 – Frapin Cuvée 1888
7. 7,500 – Martell Creation Cognac In Handcarved Baccarat Decanter
6. $7,900 – Le Voyage de Delamain
5. $12,900 – Hardy Perfection 140 years Cognac
4. $55,000 – Remy Martin Cognac Black Pearl Louis XIII
3. $200,000 – Hennessy Beaute du Siecle Cognac
2. $1,060,000- DIVA Premium Vodka
1. $2 million – Henri IV, Cognac Grande Champagne
This cognac comes in a crystal bottle dipped in 24K yellow gold and sterling platinum (four kilograms of precious metal) and decorated with 6,500 certified brilliant-cut diamonds, master-crafted by the well-known jeweler, Jose Davalos. Inside is 100 cl. of Dudognon Heritage Cognac Grande Champagne that has been aged in barrels for more than one hundred years to produce an alcohol content of 41 percent.
Monday, 29 November 2010
Useful T-SQL Sripts
Search all columns in every table for a value
Have you ever known a value in a database but had no clue what column or table it resided in? If so, you understand how frustrating it can be to spend great amounts of time searching through masses of information for the proverbial needle in a haystack. To help identify locations holding a given value, a search script can be used to spotlight all of the areas containing the needed character string.
The below script references the SQL Server metadata view, "information_schema.columns". As this provides a listing of all columns and tables within a database, it can be used as a foundation of a search. The script uses a common table expression query to populate a temporary table full of individual queries (one for each column in the database -- so it can get large and may take a few minutes). After that a "while" loop is used to execute these statements. The final result is a data set displaying all of the tables and columns matching the information searched for.
To use this script, simply place it within a query window and change the @searchValue parameter. I find it very helpful when used with an application UI - I can enter a value into the interface and use this script to find where in the database the value was stored.
Note: A few data types, such as image, cannot be converted to varchar and thus are ignored. The varchar data type was used as the base type (all data is converted to this) as it produced the fastest standardized value for comparison.
Here is the script:
--initialize transaction
set transaction isolation level read uncommitted
set nocount on
--initial declarations
declare @rowID int, @maxRowID int
declare @sql nvarchar(4000)
declare @searchValue varchar(100)
declare @statements table (rowID int, SQL varchar(8000))
create table #results (tableName varchar(250), tableSchema varchar(250), columnName varchar(250))
set @rowID = 1
set @searchValue = 'test'
--create CTE table holding metadata
;with MyInfo (tableName, tableSchema, columnName) as (
select table_name, table_schema, column_name from information_schema.columns where data_type not in ('image','text','timestamp','binary','uniqueidentifier')
)
--create search strings
insert into @statements
select row_number() over (order by tableName, columnName) as rowID, 'insert into #results select distinct '''+tableName+''', '''+tableSchema+''', '''+columnName+''' from ['+tableSchema+'].['+tableName+'] where convert(varchar,['+columnName+']) like ''%'+@searchValue+'%''' from myInfo
--initialize while components and process search strings
select @maxRowID = max(rowID) from @statements
while @rowID <= @maxRowID
begin
select @sql = sql from @statements where rowID = @rowID
exec sp_executeSQL @sql
set @rowID = @rowID + 1
end
--view results and cleanup
select * from #results
drop table #results
Have you ever known a value in a database but had no clue what column or table it resided in? If so, you understand how frustrating it can be to spend great amounts of time searching through masses of information for the proverbial needle in a haystack. To help identify locations holding a given value, a search script can be used to spotlight all of the areas containing the needed character string.
The below script references the SQL Server metadata view, "information_schema.columns". As this provides a listing of all columns and tables within a database, it can be used as a foundation of a search. The script uses a common table expression query to populate a temporary table full of individual queries (one for each column in the database -- so it can get large and may take a few minutes). After that a "while" loop is used to execute these statements. The final result is a data set displaying all of the tables and columns matching the information searched for.
To use this script, simply place it within a query window and change the @searchValue parameter. I find it very helpful when used with an application UI - I can enter a value into the interface and use this script to find where in the database the value was stored.
Note: A few data types, such as image, cannot be converted to varchar and thus are ignored. The varchar data type was used as the base type (all data is converted to this) as it produced the fastest standardized value for comparison.
Here is the script:
--initialize transaction
set transaction isolation level read uncommitted
set nocount on
--initial declarations
declare @rowID int, @maxRowID int
declare @sql nvarchar(4000)
declare @searchValue varchar(100)
declare @statements table (rowID int, SQL varchar(8000))
create table #results (tableName varchar(250), tableSchema varchar(250), columnName varchar(250))
set @rowID = 1
set @searchValue = 'test'
--create CTE table holding metadata
;with MyInfo (tableName, tableSchema, columnName) as (
select table_name, table_schema, column_name from information_schema.columns where data_type not in ('image','text','timestamp','binary','uniqueidentifier')
)
--create search strings
insert into @statements
select row_number() over (order by tableName, columnName) as rowID, 'insert into #results select distinct '''+tableName+''', '''+tableSchema+''', '''+columnName+''' from ['+tableSchema+'].['+tableName+'] where convert(varchar,['+columnName+']) like ''%'+@searchValue+'%''' from myInfo
--initialize while components and process search strings
select @maxRowID = max(rowID) from @statements
while @rowID <= @maxRowID
begin
select @sql = sql from @statements where rowID = @rowID
exec sp_executeSQL @sql
set @rowID = @rowID + 1
end
--view results and cleanup
select * from #results
drop table #results
The five most over-hyped tech products of 2010
The pace of technology innovation quickened in 2010 but there were still plenty of over-hyped products floating around.
5. Apple iPad- The truth about iPad: It’s only good for two things, it is a very good effort for a 1.0 product.
5. Apple iPad- The truth about iPad: It’s only good for two things, it is a very good effort for a 1.0 product.
4. Microsoft Kinect- Gates said the real innovation would be when you could play a tennis video game with your own racket in your hand instead of a game controller. To Microsoft’s credit, the company has almost entirely brought that vision to life with the Microsoft Kinect, a new add-on for Xbox 360 that is flying off the shelves this holiday season.
3. Samsung Galaxy Tab- The most innovative thing about the Galaxy Tab is that Samsung was the first vendor to finally bring an Android tablet to the mass market.
2. Google TV- The most disappointing technology of 2010 of Google TV.
1. 3DTV- It started at CES 2010 in January and carried all the way through to this holiday season. The TV vendors have bombarded the world with the message that the next big step in television is 3DTV and that you can have it today by buying their new premium TVs and polarized glasses. The problem is that neither the tech press nor the public is buying it.
First Windows Phone 7 Unlock tool- ChevronWP7
ChevronWP7 is the brainchild of Rafael Rivera, Long Zheng and Chris Walsh, and it allow a WP7 handset owner to side load applications that aren’t allowed in the Marketplace due to the use of private APIs.
Download links:
http://walshie.me/ChevronWP7.exe
http://www.multiupload.com/4T7AYFWLSZ
Something to do while the turkey settles …
Subscribe to:
Posts (Atom)


















