answer is: CHECKSUM
CHECKSUM computes a hash value, called the checksum, over its list of arguments. The hash value is intended for use in building hash indices. If the arguments to CHECKSUM are columns, and an index is built over the computed CHECKSUM value, the result is a hash index, which can be used for equality searches over the columns.
CHECKSUM satisfies the properties of a hash function: CHECKSUM applied over any two lists of expressions returns the same value if the corresponding elements of the two lists have the same type and are equal when compared using the equals (=) operator. For the purpose of this definition, NULL values of a given type are considered to compare as equal. If one of the values in the expression list changes, the checksum of the list also usually changes. However, there is a small chance that the checksum will not change.
BINARY_CHECKSUM and CHECKSUM are similar functions: they can be used to compute a checksum value on a list of expressions, and the order of expressions affects the resultant value. The order of columns used in the case of CHECKSUM(*) is the order of columns specified in the table or view definition, including computed columns.
CHECKSUM and BINARY_CHECKSUM return different values for the string data types, where locale can cause strings with different representation to compare equal. The string data types are char, varchar, nchar, nvarchar, or sql_variant (if its base type is a string data type). For example, the BINARY_CHECKSUM values for the strings "McCavity" and "Mccavity" are different. In contrast, in a case-insensitive server, CHECKSUM returns the same checksum values for those strings. CHECKSUM values should not be compared against BINARY_CHECKSUM values.
Examples
Using CHECKSUM to build hash indices
The CHECKSUM function may be used to build hash indices. The hash index is built by adding a computed checksum column to the table being indexed, then building an index on the checksum column.
-- Create a checksum index.
SET ARITHABORT ON
USE Northwind
GO
ALTER TABLE Products
ADD cs_Pname AS checksum(ProductName)
CREATE INDEX Pname_index ON Products (cs_Pname)
The checksum index can be used as a hash index, particularly to improve indexing speed when the column to be indexed is a long character column. The checksum index can be used for equality searches.
/*Use the index in a SELECT query. Add a second search
condition to catch stray cases where checksums match,
but the values are not identical.*/
SELECT *
FROM Products
WHERE checksum(N'Vegie-spread') = cs_Pname
AND ProductName = N'Vegie-spread'
Creating the index on the computed column materializes the checksum column, and any changes to the ProductName value will be propagated to the checksum column. Alternatively, an index could be built directly on the column indexed. However, if the key values are long, a regular index is not likely to perform as well as a checksum index.
LIVE EXAMPLE:
SELECT TBL1.* FROM TABLE1 TBL1
INNER JOIN TABLE2 TBL2 ON TBL1.COLUMN_NAME = TBL2.COLUMN_NAME
WHERE CHECKSUM(TBL1.COLUMN1,TBL1.COLUMN2) NOT IN (SELECT CHECKSUM(COLUMN1,COLUMN2) FROM ANOTHERTABLE)
I am running this Blog to help other guys, who are looking some bits and pieces in terms of MS technology....
Tuesday, July 27, 2010
Friday, July 23, 2010
What is Microsoft Dynamics CRM External Connector License?
The External Connector License is only necessary when external users access
data. The term “external users” means that users are not:
• The organization's employees
• The organization's contractors or agents
• Employees of a company affiliated to the organization
• Contractors or agents of a company affiliated with the organization
For example, an organization cannot set up an external connector license for
users in a call center environment.
Example A - License required
An organization must have an External Connector License if it wants to create a
web site where the organization's customers can view and maintain their contact
information that is stored in Microsoft Dynamics CRM.
Example B - License not required
An External Connector License is not required if an organization wants to create
a web site that only displays a form that allows the public to enter information
that will be saved in Microsoft Dynamics CRM. The key difference is that in
Example A, the external users have access to Microsoft Dynamics CRM data. In
Example B, external users will enter data that is saved in Microsoft Dynamics
CRM, but they do not have access to Microsoft Dynamics CRM data.
data. The term “external users” means that users are not:
• The organization's employees
• The organization's contractors or agents
• Employees of a company affiliated to the organization
• Contractors or agents of a company affiliated with the organization
For example, an organization cannot set up an external connector license for
users in a call center environment.
Example A - License required
An organization must have an External Connector License if it wants to create a
web site where the organization's customers can view and maintain their contact
information that is stored in Microsoft Dynamics CRM.
Example B - License not required
An External Connector License is not required if an organization wants to create
a web site that only displays a form that allows the public to enter information
that will be saved in Microsoft Dynamics CRM. The key difference is that in
Example A, the external users have access to Microsoft Dynamics CRM data. In
Example B, external users will enter data that is saved in Microsoft Dynamics
CRM, but they do not have access to Microsoft Dynamics CRM data.
Creating Additional Organizations
When Microsoft Dynamics CRM is installed, the Microsoft CRM Server Setup
wizard prompts the Administrator for the default organization information. The
wizard, in turn, creates the organization record and adds it into the configuration
database.
Following installation of the Microsoft Dynamics CRM Enterprise Edition, any
additional organizations must be added by the CRM Administrator through a new
Organizations tool in Deployment Manager.
Perform the following steps to create a new organization using the Deployment
Manager's Organizations tool:
1. On your desktop, click the Start menu, click All Programs, click
the Microsoft Dynamics CRM program group, then click
Deployment Manager.
2. Click on the Organizations folder to view the existing
organizations.
3. To add a new organization, either right click on the Organizations
folder and select New Organization, or click Action on the menu bar
and select New Organization.
4. In the New Organization Wizard, on the Specify the Organization
Name window, enter the Organization name. The name cannot
include blank spaces or any unsupported characters.
5. When you tab out of the Organization name field, the same name is
prefilled in the Friendly name field. Change this value if required.
Note: You can add blank spaces back in to the Friendly name if
necessary. For example, if adding an organization record for
Northwind Traders, the organization name might be
“NorthwindTraders”, but the Friendly name could be “Northwind
Traders”.
6. The ISO currency code field specifies the base currency for the new
organization. Click the Browse button and select the new
organization's base currency. Click OK.
7. The Currency name and Currency symbol are prefilled based on the
selected base currency. Click Next.
8. On the Help Us Improve the Customer Experience window, select
whether this organization is willing to participate in the Customer
Experience Improvement program. Click Next.
9. On the Select SQL Server window, select from the drop down list the
Microsoft SQL Server that contains the CRM database. Click Next.
10. On the Specify Reporting Services Server window, the report server
URL is prefilled for you. Change this value if necessary. Click Next.
11. On the System Requirements window, review the results of the
verification tasks. If any errors occur, click Details for more
information. If necessary, click Back to correct any previously
entered information. If no errors occurred, click Next.
12. On the Ready to Create window, verify the organization information.
If anything requires change, click Back to correct the information. If
all the information is correct, click Create.
13. Click Finish once the New Organization is successfully created.
14. The new organization will appear in the Organizations folder.
Microsoft Dynamics CRM uses Active Directory for storing information
regarding:
• Users
• Client computers
• The Organizational Unit
• Security groups
wizard prompts the Administrator for the default organization information. The
wizard, in turn, creates the organization record and adds it into the configuration
database.
Following installation of the Microsoft Dynamics CRM Enterprise Edition, any
additional organizations must be added by the CRM Administrator through a new
Organizations tool in Deployment Manager.
Perform the following steps to create a new organization using the Deployment
Manager's Organizations tool:
1. On your desktop, click the Start menu, click All Programs, click
the Microsoft Dynamics CRM program group, then click
Deployment Manager.
2. Click on the Organizations folder to view the existing
organizations.
3. To add a new organization, either right click on the Organizations
folder and select New Organization, or click Action on the menu bar
and select New Organization.
4. In the New Organization Wizard, on the Specify the Organization
Name window, enter the Organization name. The name cannot
include blank spaces or any unsupported characters.
5. When you tab out of the Organization name field, the same name is
prefilled in the Friendly name field. Change this value if required.
Note: You can add blank spaces back in to the Friendly name if
necessary. For example, if adding an organization record for
Northwind Traders, the organization name might be
“NorthwindTraders”, but the Friendly name could be “Northwind
Traders”.
6. The ISO currency code field specifies the base currency for the new
organization. Click the Browse button and select the new
organization's base currency. Click OK.
7. The Currency name and Currency symbol are prefilled based on the
selected base currency. Click Next.
8. On the Help Us Improve the Customer Experience window, select
whether this organization is willing to participate in the Customer
Experience Improvement program. Click Next.
9. On the Select SQL Server window, select from the drop down list the
Microsoft SQL Server that contains the CRM database. Click Next.
10. On the Specify Reporting Services Server window, the report server
URL is prefilled for you. Change this value if necessary. Click Next.
11. On the System Requirements window, review the results of the
verification tasks. If any errors occur, click Details for more
information. If necessary, click Back to correct any previously
entered information. If no errors occurred, click Next.
12. On the Ready to Create window, verify the organization information.
If anything requires change, click Back to correct the information. If
all the information is correct, click Create.
13. Click Finish once the New Organization is successfully created.
14. The new organization will appear in the Organizations folder.
Microsoft Dynamics CRM uses Active Directory for storing information
regarding:
• Users
• Client computers
• The Organizational Unit
• Security groups
How to delete organizations in CRM?
As per many peoples, Once organization created in CRM it will be disabled but never deleted.
It's wrong,If required to delete existing organizations then read the following paragraph.
When an administrator creates a new organization in the Enterprise Edition of
Microsoft Dynamics CRM, the organization information is stored in the
configuration database. Similarly, the administrator can remove an existing
organization from the configuration database, although the organization must be
disabled first before it can be deleted. And if there are no more organizations left
in the configuration database, the administrator can uninstall Microsoft Dynamics
CRM from the server(s).
It's wrong,If required to delete existing organizations then read the following paragraph.
When an administrator creates a new organization in the Enterprise Edition of
Microsoft Dynamics CRM, the organization information is stored in the
configuration database. Similarly, the administrator can remove an existing
organization from the configuration database, although the organization must be
disabled first before it can be deleted. And if there are no more organizations left
in the configuration database, the administrator can uninstall Microsoft Dynamics
CRM from the server(s).
Update page size in CRM 4.0
As defined in CRM you can increase your page size maximum of 250 records, but if you need to resize it for 1000-2000 records then you are unable to do it, you can do it in unsupported way after using the following code.
update usersettings set PagingLimit=1900 where ModifiedByName='user name'
Refresh your CRM panel, if not reflecting then reset application Pool in IIS.
update usersettings set PagingLimit=1900 where ModifiedByName='user name'
Refresh your CRM panel, if not reflecting then reset application Pool in IIS.
Friday, July 16, 2010
What is CredentialCache Class in CRM SDK
The CredentialCache class stores credentials for multiple Internet resources. Applications that need to access multiple resources can store the credentials for those resources in a CredentialCache instance that then provides the proper set of credentials to the Internet resource when required. When the GetCredential method is called, it compares the Uniform Resource Identifier (URI) and authentication type provided with those stored in the cache and returns the first set of credentials that match.
The DefaultCredentials property contains the system credentials of the current security context. For client applications, these represent the user name, password, and domain of the user who is currently logged in. For ASP.NET applications, the default credentials are the user credentials of the logged-in user or the user being impersonated.
The DefaultCredentials property contains the system credentials of the current security context. For client applications, these represent the user name, password, and domain of the user who is currently logged in. For ASP.NET applications, the default credentials are the user credentials of the logged-in user or the user being impersonated.
How to cancel Save Operation in MS CRM4.0
Pass this line of code to prevent saving the current items in CRM.
// Cancel the save operation.
event.returnValue = false;
// Cancel the save operation.
event.returnValue = false;
Subscribe to:
Posts (Atom)
Split the String values with a special character in MS Flow to convert this into Array
Many times we have a requirement to prepare the Mailing address for some of the documents, suppose there are Address Line1, Address Line2, ...
-
Sometimes you experienced when you have subgrid in your CRM Form, but when you click the ‘expand’ button to expand the view then it will re...
-
I have a web service that takes a serialize string and saves it. This works fine for "small" files, but once I hit a large siz...
-
Use the following line of code to create complete workflow activity with two output parameters. 1) Open Visual Studio 2010 ID. 2) Open ...