Sometimes it is useful to have the total. It is especially useful for statistics calculations. COUNT(*) OVER (PARTITION BY 1) AS Total
Sometimes the setup of the reports are to be checked via script on Reporting Service 2005. From the reporting service database the table Catalog contains the parameters setup for the report in the XML Parameter column Selecting wheither at least one of the prompt users have been set. XQuery is better for spefific queries SELECT Parameter, * […]
Normally RAND() in TSQL returns the same number for the whole query to save time. But when you are generating test data you want different numbers for each line. This is a utility function that does that expanded to provide int values between min and max with min and max values included First trick is […]
A lot of tasks for reporting uses percentile or fractions for performance so you can state such as 25 % of the work was done in this time. It can be accomplished in a lot of ways but the easiest I have found is the following: Percentile Table Variable DECLARE @PercentileTable TABLE (Percentile FLOAT) INSERT […]
Using multivalue parameters in reports in Reporting Service 2005 The multivalue parameter is transformed into a list expanding @Name parameter with the values “BE”,”AV” used in “Company IN (@Name)” to “Company IN (‘BE’,’AV’)” and thus making it impossible to pass the value to a user defined function or stored procedure. To pass the parameter an […]
As the normal SqlClient cannot handle the GO statement from SSMS another connection need to be created via Server class in SMO.
When you need to make a conditional build you need to think of the reason and normally a Conditional Attribute is the best way to go. I show how to use it.
The spring framework has several parts that make it a great starting point for application development as the development is easier and faster and more reliable. There is a lot of tutorials of how to use it and most of them are quite simple. I will make examples of how I use it in production […]
My stored procedure template
I show my naming standard for objects in a database.