There are two UDF's included here.The first one will return the number of Years, Months and Days between a Start and End date.The second one will return either Years, Months or Days which makes it much easier to include in a select.If you know of or find a better/faster way to do this, then please […]
2006-08-01 (first published: 2004-09-23)
173 reads
Out of the box, Reporting services does not handle divide by zero conditions gracefully. There are plenty of posting on how to use the IIF() function to accomplish this, with some rather horrific looking code. In order to simplify the coding process and make the resulting expressions readable by a mere mortal, I wrote the […]
2006-07-28 (first published: 2005-05-26)
3,990 reads
Alphanumeric and Special Character Validation=========================================/*Function name: fn_ValidateStringDescription : This function is used to validate whether the given string contains Alphanumeric character and some special character’s ‘@’ ,’(‘, ‘ )’, ‘_’, ‘-‘Parameters: 1) @InputString varchar(25) Accepts the string, which we need to validate 2) @Type int = 0 validate the string for only alphanumeric characters i.e […]
2006-07-26 (first published: 2004-09-15)
1,640 reads
This function will calcuate the number hours between two dates excluding weekends. This allows for cycle time metrics and anything else requiring only the hours of weekdays.
2006-07-20 (first published: 2004-12-16)
364 reads
This script gathers stats_date and index information for all of the current database. Please feel free to modify it as it is made up of components that are available on this site here- http://www.sqlservercentral.com/scripts/contributions/97.aspand a BOL entry for stats_date.I needed this information and thought I would share it.
2006-07-17 (first published: 2005-04-29)
550 reads
This stored procedure gives you metadata information from the reportserver database about published reports, datasources, directories,authorized users/groups,(shared)schedules and subscriptions.I integrated this stored procedure in a report in our MS report services environment for auditing purposes
2006-07-14 (first published: 2005-06-01)
440 reads
This script generate spool with create index for all foreign key.
2006-07-12 (first published: 2004-02-26)
378 reads
The Query will enable you to retrieve all the Tables in the Database .The Output of the Query will list all the User Tables along with the Column Names and the Sort order of the Columns .The Query will also return as to whether the Columns in the table are with allow null option or […]
2006-07-06 (first published: 2004-11-18)
425 reads
2006-07-04 (first published: 2006-06-28)
168 reads
This is an example to overcome short comings when using BCP to create a 'proper' CSV file. The view vw_Customers_RAW is used in order to provide a method of creating the column heading row and to enclose columns with embedded comma with double quotes, which are not options in BCP. There are more generic methods […]
2006-07-03 (first published: 2006-06-29)
3,027 reads