Archive for September, 2008

Executing multiple INSERT in a single query

This item was filled under [ SQL Server ]

In SQL Server 2000, you can insert multiple records by using a single INSERT statement. It helps to boost performance a little and the task gets done in a single query.
Sample code:

INSERT INTO MyTable  (Col1, Col2)
SELECT  'First', 1
UNION ALL
SELECT  'Second', 2
UNION ALL
SELECT  'Third', 3
UNION ALL
SELECT  'Fourth', 4
UNION ALL
SELECT  'Fifth', 5
GO

Continue reading...

Encrypting Stored Procedures in SQL Server

This item was filled under [ SQL Server ]

Often developers require hiding the stored procedures from end users. In such case, developers can perform a one way encryption using the WITH ENCRYPTION clause. Once the definition of the stored procedure is encrypted, it cannot be decrypted or viewed by anyone.
Sample Code:

CREATE PROCEDURE [SP_Name]
WITH ENCRYPTION
AS

SELECT
[CustomerID], [CompanyName]
FROM
[Northwind].[dbo].[Customers]

If your stored procedure has some parameters, you can [...]

Continue reading...

Does your Adsense revenue depend upon number of clicks?

This item was filled under [ SEO/Adsense ]

Last week I came across a post on the ‘Adsense Blog’ – and it cleared up my confusion regarding Adsense earning. Google Adsense program is wiser than a layman thinks. You start earning more when you start getting healthy clicks! Quoting from the Adsense Blog:
If your website performs well for advertisers, there may be increased competition [...]

Continue reading...

Google Chrome: Offline Installation

This item was filled under [ Uncategorized ]

Unable to download the browser? Get the full setup from MediaFire. Click on the filename below to proceed!
chrome_installer.exe (7.35 MB)
Enjoy!

Continue reading...

SQL Server: DATEDIFF limitations

This item was filled under [ SQL Server ]

DATEDIFF produces an error if the result is out of range for integer values. For milliseconds, the maximum number is 24 days, 20 hours, 31 minutes and 23.647 seconds. For seconds, the maximum number is 68 years.
Source: Transact-SQL Reference

Continue reading...

Tagged with: [ , ]