T-SQL Convert DateTime to String yyyy-mm-dd yyyymmdd and other common formats

— MSSQL Server string to date conversion – datetime string format sql server — MSSQL string to datetime conversion – convert char to date sql server SELECT convert(datetime, ‘Oct 23 2012 11:01AM’, 100) — mon dd yyyy hh:mmAM (or PM) SELECT convert(datetime, ‘Oct 23 2012 11:01AM’) — 2012-10-23 11:01:00.000 — Without century (yy) string date […]

SQL Server (T-SQL) find average size of a row

We have one table with about 120 columns in it. I was just curious what the average row size was, and found this slick solution: Use DBCC to find the “Average Size of a Row” Syntax: dbcc showcontig (‘your_table_name‘) with tableresults My tablename=’Transaction’, so substitute your tablename there. Example: dbcc showcontig (‘Transaction’) with tableresults Enlarged: […]

Example of a RegEx C# Parsing Function

Below is a code fragment I use to extract a matching string using RegEx (C# Regular Expression). I put it in a class library, and make it available to BizTalk Orchestrations, Pipeline, and Map Scripting functoids that might need to call it. <pre> //using System.Text.RegularExpressions;  <– put this above your class, put the method below in […]

Error: Failed to load Group xxxx.BizTalkMgmtDb] data providers (in BTSAdmin Console)

Error: Failed to load Group xxxx.BizTalkMgmtDb] data providers (in BTSAdmin Console) Solution: Verify SQL Server is available, if not, start-it. Screen shot below shows trying to connect to the SQL server; it might be on the same machine as BizTalk or it might be on another machine. The above error could also indicate a communication […]

Failed to Update Binding Information – Name or Trust Level Mismatches

I cannot count how many times I have got the error below: It typically happens when you try to import a BizTalk MSI application fro, one machine and export it to another. What it implies is that that system you have exported from, and the system to which you are importing, having different settings on […]

Searching for UTF-8 or UTF-16 characters in a text file

Using the following Reg-Ex (Regular Expression) to find UTF-8 or UTF-16 characters in a text file; this should work with any editor that supports Reg-Ex, such as NotePad++ or Visual Studio. Be sure and check the “Regular Expression” option on the search, then type in the find string: [x80-xFF]

Recent Posts

Archives

Categories

Meta

All Rights Reserved Theme by 404 THEME.