Tag: Queries

Best Practice for Building CRM Queries in an SSRS Custom Report

When writing a custom SSRS report for CRM, one of the greatest features is the ability to include pre-filtering in your reports.  By adding the CRMAF_ prefix to the alias assigned to the table you are querying, it will pass your selected CRM records as the context for your report. E.g.:

SELECT * FROM FilteredAccount AS CRMAF_Account

When writing a custom SSRS report for CRM, one of the greatest features is the ability to include pre-filtering in your reports.  By adding the CRMAF_ prefix to the alias assigned to the table you are querying, it will pass your selected CRM records as the context for your report. E.g.:

SELECT * FROM FilteredAccount AS CRMAF_Account

When writing a custom SSRS report for CRM, one of the greatest features is the ability to include pre-filtering in your reports.  By adding the CRMAF_ prefix to the alias assigned to the table you are querying, it will pass your selected CRM records as the context for your report. E.g.:

SELECT * FROM FilteredAccount AS CRMAF_Account

When writing a custom SSRS report for CRM, one of the greatest features is the ability to include pre-filtering in your reports.  By adding the CRMAF_ prefix to the alias assigned to the table you are querying, it will pass your selected CRM records as the context for your report. E.g.:

SELECT * FROM FilteredAccount AS CRMAF_Account

When writing a custom SSRS report for CRM, one of the greatest features is the ability to include pre-filtering in your reports.  By adding the CRMAF_ prefix to the alias assigned to the table you are querying, it will pass your selected CRM records as the context for your report. E.g.:

SELECT * FROM FilteredAccount AS CRMAF_Account

Read More »

Five Tips on Understanding SQL Server Better

Being a developer I often find myself in situations where I need to troubleshoot SQL queries that are not performing well and generally need optimizations. I would like to share some interesting tips on how SQL Server handles queries and what execution plans might be better than others. A query execution plan is an ordered set of steps that are used to access the data in SQL server. If you are working with SQL Server Management Studio once you have started a new query window click the following button  (or CTRL + M) so you can enable execution plans. In the examples below I will be using tables from AdventureWorks database which is a sample database provided by Microsoft.

Read More »