<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CUcASHw_fSp7ImA9WhBbGEw.&quot;"><id>tag:blogger.com,1999:blog-2328222207349876984</id><updated>2013-05-17T12:50:49.245-05:00</updated><category term="datatypes" /><category term="errormessage" /><category term=".net3.5" /><category term="tsql" /><category term="disasterrecovery" /><category term="ssas" /><category term="servername" /><category term="date" /><category term="winmerge" /><category term="powershell" /><category term="defaultconstraint" /><category term="nolock" /><category term="sql2008r2sp1" /><category term="cerd" /><category term=".net" /><category term="performance" /><category term="review" /><category term="visualstudio" /><category term="float" /><category term="2008" /><category term="cpu" /><category term="backup" /><category term="humor" /><category term="xevents" /><category term="xml" /><category term="linq" /><category term="tinyint" /><category term="iis" /><category term="threads" /><category term="heap" /><category term="cdc" /><category term="security" /><category term="azure" /><category term="foreignkey" /><category term="dts" /><category term="Nonsql" /><category term="lambda" /><category term="ssis" /><category term="int" /><category term="oracle" /><category term="isolationlevel" /><category term="ssrs" /><category term="filestream" /><category term="routines" /><category term="snapshotisolation" /><category term="sqlsaturday" /><category term="sqlbi" /><category term="partition" /><category term="sp3" /><category term="columnstore" /><category term="erd" /><category term="dedup" /><category term="sqlsat64" /><category term="dependencies" /><category term="google" /><category term="batonrouge" /><category term="tfs" /><category term="transactionlog" /><category term="brssug" /><category term="lafayette" /><category term="ssms" /><category term="normalization" /><category term="ssdt" /><category term="sqldenali" /><category term="sharepoint" /><category term="downloads" /><category term="excel" /><category term="dta" /><category term="sqlagent" /><category term="perd" /><category term="guids" /><category term="readuncommitted" /><category term="autogrowth" /><category term="script" /><category term="defaulttrace" /><category term="windows" /><category term="defrag" /><category term="schemacompare" /><category term="powerpivot" /><category term="math" /><category term="ssis script" /><category term="resourcegovernor" /><category term="dmv" /><category term="schemabinding" /><category term="usergroup" /><category term="multithreading" /><category term="datetime2" /><category term="cube" /><category term="visio" /><category term="size" /><category term="sql2012" /><category term="instance" /><category term="join" /><category term="slidedeck" /><category term="over" /><category term="teched" /><category term="certification" /><category term="aitp" /><category term="diagram" /><category term="houstontechfest" /><category term="sql" /><category term="sqlsat28" /><category term="twitter" /><category term="microsoft" /><category term="index" /><category term="information_schema" /><category term="sql 2008" /><category term="deadlock" /><category term="replication" /><title>SQL Tact</title><subtitle type="html">&lt;b&gt;pointers, solutions and scripts for the SQL DBA&lt;br&gt;Not intended to replace common sense&lt;/b&gt;</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.sqltact.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.sqltact.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default?start-index=6&amp;max-results=5&amp;redirect=false&amp;v=2" /><author><name>w</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>111</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>5</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SqlTact" /><feedburner:info uri="sqltact" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CEAGSHkzfSp7ImA9WhBUFUQ.&quot;"><id>tag:blogger.com,1999:blog-2328222207349876984.post-9014194581498070935</id><published>2013-05-03T09:41:00.001-05:00</published><updated>2013-05-03T09:52:09.785-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-03T09:52:09.785-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="performance" /><category scheme="http://www.blogger.com/atom/ns#" term="defaulttrace" /><category scheme="http://www.blogger.com/atom/ns#" term="autogrowth" /><title>Use the Default System Trace to Find Autogrowth Events</title><content type="html">The SQL Server Management Studio built-in standard report for "Disk Usage" is very handy to view the performance-sucking autogrowth events for a database... until you want to see if autogrowth events have been occurring in &lt;i&gt;any &lt;/i&gt;database on the server.&lt;br /&gt;
&lt;br /&gt;
Autogrowth events are very problematic and can cause sudden, unpredictable and difficult-to-troubleshoot application timeouts and performance drops. This applies to any SQL Server database file, including those in SharePoint databases, system databases (such as the tempdb), and any user database data file or log file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[As an aside, your friends in SharePoint know all about Autogrowth settings for their content databases as well. &amp;nbsp;Friend of the blog Drew at WerePoint posted this relevant blog entry recently about the timing of growth and recycle-bin emptying events.&amp;nbsp;&lt;a href="http://werepoint.blogspot.com/2013/05/on-proper-care-and-feeding-of-content.html"&gt;http://werepoint.blogspot.com/2013/05/on-proper-care-and-feeding-of-content.html&lt;/a&gt;&amp;nbsp;]&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Ideally, as professional DBAs, we don't want to ever see an autogrowth event occur on our databases. &amp;nbsp;By proactively monitoring the space in our database files, we can grow database files on our own terms, on our own schedule (outside of busy hours), and without interrupting a user transaction.&lt;br /&gt;
&lt;br /&gt;
Autogrowth events occur when a data file or log file has exhausted its reservation. SQL is forced to request the operating system that more space to be added to a file. During this request and the file growth, &lt;i&gt;very little happens&lt;/i&gt;&amp;nbsp;to the data file. This typically occurs &lt;i&gt;during&lt;/i&gt;&amp;nbsp;a user transaction - bad news!&lt;br /&gt;
&lt;br /&gt;
The increment of the autogrowth might be defaulted to just 1 MB on your system, which means a single large transaction could result in a series of sequential autogrowth events before the transaction finally commits. &amp;nbsp;In the end, the argument over fixed autogrowth size versus percentage-based autogrowth settings are academic - a vigilant DBA should try to avoid autogrowth events in the first place.&lt;br /&gt;
&lt;br /&gt;
But, while we're on the topic, 10% is a completely reasonable growth rate for data and log files for most databases. Depending on your available storage space, moving to a fixed growth rate (100mb-500mb) is more appropriate. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/ms175935.aspx" target="_blank"&gt;Instant File Initialization&lt;/a&gt; can also make a big difference in the time required to grow a database file (as well as restore database backups.) Note that this may need to be enabled at the virtual guest and SAN level for some virtual environments.&lt;br /&gt;
&lt;br /&gt;
Here's a script to view the available space in every database file in a SQL Server instance, using the hacky old sp_MSforeachdb undocumented stored procedure:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="brush: sql"&gt;exec sp_MSforeachdb  'use [?]; 
SELECT 
  ''DatabaseName_____________'' = d.name
, Recovery = d.recovery_model_desc
, ''DatabaseFileName_______'' = df.name
, ''Location_______________________________________________________________________'' = df.physical_name
, df.File_ID
, FileSizeMB = CAST(size/128.0 as Decimal(9,2))
, SpaceUsedMB = CAST(CAST(FILEPROPERTY(df.name, ''SpaceUsed'') AS int)/128.0 as Decimal(9,2))
, AvailableMB =  CAST(size/128.0 - CAST(FILEPROPERTY(df.name, ''SpaceUsed'') AS int)/128.0 as Decimal(9,2))
, ''Free%'' = CAST((((size/128.0) - (CAST(FILEPROPERTY(df.name, ''SpaceUsed'') AS int)/128.0)) / (size/128.0) ) * 100. as Decimal(9,2))
 FROM sys.database_files df
 cross apply sys.databases d
 where d.database_id = DB_ID() 
 and size &amp;gt; 0
'
&lt;/pre&gt;
&lt;/blockquote&gt;
One important piece of information we can get from the default trace when we look for autogrowth events is the time and duration of each autogrowth event. &amp;nbsp;I've personally used these two pieces of information to prove that random application timeouts experienced by a client were because of database file autogrowth events stalling their transaction for &lt;i&gt;whole seconds&lt;/i&gt;&amp;nbsp;while more space was added.&lt;br /&gt;
&lt;br /&gt;
How far back does the default trace go? It depends on how much activity is being written to the default trace (which obviously &lt;a href="http://msdn.microsoft.com/en-us/library/ms175513.aspx" target="_blank"&gt;needs to be enabled for this to work&lt;/a&gt;). The current active default trace file keeps up to 20mb of data. &amp;nbsp;&lt;a href="http://blogs.technet.com/b/sqlpfeil/archive/2013/01/21/check-your-sql-default-trace.aspx" target="_blank"&gt;Five default trace files are kept of 20mb each&lt;/a&gt;. This script only reads the latest file.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="brush: sql"&gt;DECLARE @tracepath nvarchar(260)

SELECT 
 @tracepath = path 
FROM sys.traces 
WHERE is_default = 1

SELECT 
 DBName    = g.DatabaseName
, DBFileName   = mf.physical_name
, FileType   = CASE mf.type WHEN 0 THEN 'Row' WHEN 1 THEN 'Log' WHEN 2 THEN 'FILESTREAM' WHEN 4 THEN 'Full-text' END
, EventName   = te.name
, EventGrowthMB  = convert(decimal(19,2),g.IntegerData*8/1024.) -- Number of 8-kilobyte (KB) pages by which the file increased.
, EventTime   = g.StartTime
, EventDurationSec = convert(decimal(19,2),g.Duration/1000./1000.) -- Length of time necessary to extend the file.
, CurrentAutoGrowthSet= CASE
        WHEN mf.is_percent_growth = 1
        THEN CONVERT(char(2), mf.growth) + '%' 
        ELSE CONVERT(varchar(30), convert(decimal(19,2), mf.growth*8./1024.)) + 'MB'
       END
, CurrentFileSizeMB = convert(decimal(19,2),mf.size* 8./1024.)
, MaxFileSizeMB  = CASE WHEN mf.max_size = -1 THEN 'Unlimited' ELSE convert(varchar(30), convert(decimal(19,2),mf.max_size*8./1024.)) END
FROM fn_trace_gettable(@tracepath, default) g
cross apply sys.trace_events te 
inner join sys.master_files mf
on mf.database_id = g.DatabaseID
and g.FileName = mf.name
WHERE g.eventclass = te.trace_event_id
and  te.name in ('Data File Auto Grow','Log File Auto Grow')
--GROUP BY StartTime,Databaseid, Filename, IntegerData, Duration
order by StartTime desc
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=lt-mvyyAzg0:VP7AjZz9MT4:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=lt-mvyyAzg0:VP7AjZz9MT4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/SqlTact/~4/lt-mvyyAzg0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqltact.com/feeds/9014194581498070935/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqltact.com/2013/05/use-default-system-trace-to-find.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/9014194581498070935?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/9014194581498070935?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SqlTact/~3/lt-mvyyAzg0/use-default-system-trace-to-find.html" title="Use the Default System Trace to Find Autogrowth Events" /><author><name>w</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.sqltact.com/2013/05/use-default-system-trace-to-find.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIEQ3g7eSp7ImA9WhBbEUQ.&quot;"><id>tag:blogger.com,1999:blog-2328222207349876984.post-2766553534493535086</id><published>2013-05-03T09:29:00.000-05:00</published><updated>2013-05-10T08:28:22.601-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-10T08:28:22.601-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="performance" /><category scheme="http://www.blogger.com/atom/ns#" term="index" /><category scheme="http://www.blogger.com/atom/ns#" term="dmv" /><category scheme="http://www.blogger.com/atom/ns#" term="heap" /><title>Hunt Down Tables Without Clustered Indexes</title><content type="html">This one's a gimme, but an underrated utility script when I enter a new environment and look for low-hanging fruit for easy improvements.&lt;br /&gt;
&lt;br /&gt;
You'd be surprised how many vendors ship applications without a single index, much less properly aligned clustered indexes. &lt;br /&gt;
&lt;br /&gt;
Heaps are bad. &amp;nbsp;You can't defragment a heap by performing index maintenance, despite old myths about the &lt;a href="http://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2930-fixing-heap-fragmentation/" target="_blank"&gt;create/drop a clustered index trick&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
Similarly, the myth of a heap performing better on pure inserts vs a table with a clustered index is an academic one. &amp;nbsp;Heaps are impossible to order, which means selecting from a heap is always a scan. &lt;br /&gt;
&lt;br /&gt;
If your table will be constantly written to and rarely read, put a clustered index on it. &amp;nbsp;The writes will be sequential, resulting in &lt;strike&gt;fewer page breaks and&lt;/strike&gt; less fragmentation, which mean more efficient storage and maintenance.&lt;br /&gt;
&lt;br /&gt;
EDIT: Page "breaks" (I meant splits) aren't possible on heaps, but forwarding pointers, which create a maze of bad performance in heaps with nonclustered indexes. Thanks to commenters for pointing this out!&lt;br /&gt;
&lt;br /&gt;
And when you have to look in that table for a stray logging record, it won't be a full table scan. If your table will be constantly written to and &lt;i&gt;never&lt;/i&gt; read, why is it in your database? &amp;nbsp;Such a table doesn't exist.&lt;br /&gt;
&lt;br /&gt;
This script is an easy one to use for finding heaps in a database, along with the row count and size of jumbled data that is haunting your database. &amp;nbsp;It is in my &lt;a href="http://www.sqltact.com/2012/04/sql-script-toolbox-for-developers.html" target="_blank"&gt;DBA toolbox&lt;/a&gt; folder alongside many other scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;pre class="brush: sql"&gt;--Doesn't work on 2000 databases or databases in 2000 compatability mode.  Need to change the db_id() syntax if so.

select 
 [Database Name] = db_name()
, [Table Name] = s.name + '.' + o.name
, p.row_count
, SizeMb= (p.reserved_page_count*8.)/1024.
from 
 sys.objects o
inner join  sys.schemas s on o.schema_id = s.schema_id
inner join  sys.dm_db_partition_stats p  on p.object_id = o.object_id 
inner join  sys.indexes si on si.object_id = o.object_ID
WHERE si.type_desc = 'Heap'
and  is_ms_shipped = 0
order by SizeMb desc
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal"&gt;
As an aside, but a different blog post altogether - a good clustered key is narrow, unique, unchanging and sequential - which is why IDENTITY integer columns are the perfect clustered key. &amp;nbsp;Compound clustered keys can be a big waste of space.&lt;/div&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=yCKlV_f_aq0:1Jd5GYi40Go:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=yCKlV_f_aq0:1Jd5GYi40Go:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/SqlTact/~4/yCKlV_f_aq0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqltact.com/feeds/2766553534493535086/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqltact.com/2013/05/hunt-down-tables-without-clustered.html#comment-form" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/2766553534493535086?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/2766553534493535086?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SqlTact/~3/yCKlV_f_aq0/hunt-down-tables-without-clustered.html" title="Hunt Down Tables Without Clustered Indexes" /><author><name>w</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>8</thr:total><feedburner:origLink>http://www.sqltact.com/2013/05/hunt-down-tables-without-clustered.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEFQXg7eip7ImA9WhBQGEs.&quot;"><id>tag:blogger.com,1999:blog-2328222207349876984.post-4498090133411002695</id><published>2013-03-21T06:00:00.000-05:00</published><updated>2013-03-21T06:00:10.602-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-21T06:00:10.602-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="visualstudio" /><category scheme="http://www.blogger.com/atom/ns#" term="ssdt" /><category scheme="http://www.blogger.com/atom/ns#" term="schemabinding" /><title>TRY_CONVERT broken by WITH SCHEMABINDING in SQL Server 2012 Data Tools build</title><content type="html">Here's a bug you might find if attempting to schemabind an object that uses the new TRY_CONVERT function.&lt;br /&gt;
&lt;br /&gt;
To reproduce, run the following code in a SSDT database solution:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: sql"&gt;CREATE VIEW [dbo].[aview] WITH SCHEMABINDING&amp;nbsp;
AS&amp;nbsp;
SELECT id = TRY_CONVERT(int, id)&amp;nbsp;
FROM dbo.arealtable&lt;/pre&gt;
&lt;br /&gt;
The database project should build with this error:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="color: red;"&gt;Error&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;3&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;SQL70561: Cannot schema bind view '[dbo].[aview]' because name 'int' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself.&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;C:\Users\...\Documents\Visual Studio 2010\Projects\...\Views\dbo.aview.sql&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
This view is perfectly valid in SQL Server, and can be created without a problem. In a Data Tools database solution, it prevents the solution from being built with the above error.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-jiG7933JoDc/UUn_WwLlGEI/AAAAAAAAT1g/h5vftUamY0w/s1600/try_convert+error+in+data+tools.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="97" src="http://3.bp.blogspot.com/-jiG7933JoDc/UUn_WwLlGEI/AAAAAAAAT1g/h5vftUamY0w/s320/try_convert+error+in+data+tools.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In the above screenshot, "try_convert(int" is underlined in red because SSDT isn't recognizing the syntax correctly. &amp;nbsp;Again, this only appears when the view is created with schemabinding.&lt;br /&gt;
&lt;br /&gt;
Note that in my bug report, the project's target platform is SQL 2012 and the project's database settings compatibility mode is SQL 2012, using Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1 and SQL Server Data Tools 10.3.21101.1. &lt;br /&gt;
&lt;br /&gt;
This has been marked as "resolved" on Microsoft Connect, and the fix "will appear in an upcoming release of DACFx/SSDT", as of March 2013:&amp;nbsp;&lt;a href="https://connect.microsoft.com/SQLServer/feedback/details/772804/try-convert-broken-by-with-schemabinding-in-sql-server-2012-data-tools-build#details"&gt;https://connect.microsoft.com/SQLServer/feedback/details/772804/try-convert-broken-by-with-schemabinding-in-sql-server-2012-data-tools-build#details&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=-hWCUpYWDrI:_AgXP253Ok0:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=-hWCUpYWDrI:_AgXP253Ok0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/SqlTact/~4/-hWCUpYWDrI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqltact.com/feeds/4498090133411002695/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqltact.com/2013/03/tryconvert-broken-by-with-schemabinding.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/4498090133411002695?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/4498090133411002695?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SqlTact/~3/-hWCUpYWDrI/tryconvert-broken-by-with-schemabinding.html" title="TRY_CONVERT broken by WITH SCHEMABINDING in SQL Server 2012 Data Tools build" /><author><name>w</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-jiG7933JoDc/UUn_WwLlGEI/AAAAAAAAT1g/h5vftUamY0w/s72-c/try_convert+error+in+data+tools.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.sqltact.com/2013/03/tryconvert-broken-by-with-schemabinding.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8EQXk9fSp7ImA9WhBRF04.&quot;"><id>tag:blogger.com,1999:blog-2328222207349876984.post-7150055343661405781</id><published>2013-03-08T04:00:00.000-06:00</published><updated>2013-03-08T04:00:00.765-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-08T04:00:00.765-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql" /><category scheme="http://www.blogger.com/atom/ns#" term="guids" /><category scheme="http://www.blogger.com/atom/ns#" term="index" /><title>Conversation History: The Continuing Case Against GUIDs</title><content type="html">We had a &lt;a href="http://www.sqltact.com/2013/01/try-database-design-exercise-at-your.html" target="_blank"&gt;cooperative relational database design exercise&lt;/a&gt; at the office last week as part of our regular department "Lunch and Learn" series, and inevitably one topic that came up is the use of GUIDs as the unique key for a table.&lt;br /&gt;
&lt;br /&gt;
And before long, I had been goaded onto my soapbox to deliver my hellfire-and-brimstone sermon against the use of GUIDs as the primary key, much less the clustered index, of a table. (If you haven't heard this, you need to attend more &lt;a href="http://www.brssug.org/" target="_blank"&gt;Baton Rouge SQL Server User Group&lt;/a&gt; meetings.)&lt;br /&gt;
&lt;br /&gt;
The case for GUIDs traces back to an oil rig case study, an actual design example we (at Sparkhound) encountered here in the Gulf South. There are hundreds of oil rigs out in the middle of the Gulf of Mexico, each with a sometimes-available Internet connection, and the need to sync back home to a onshore server. &amp;nbsp;By using GUIDs, each server can write a unique key to the same table, so the argument says, without any conflicts.&lt;br /&gt;
&lt;br /&gt;
(This is not my complete soap-box against GUIDs. &amp;nbsp;Another day.)&lt;br /&gt;
&lt;br /&gt;
Why not use a compound key of integers? &amp;nbsp;Surely, you must still identify what oil rig is sending the data, then using a rig-side identity column would provide a compound primary key with guaranteed uniqueness and at half the cost (4 bytes x 2) of a GUID (16 bytes). &amp;nbsp;That storage space adds up, and has a big impact on nonclustered indexes, fragmentation, page splits, etc.&lt;br /&gt;
&lt;br /&gt;
After that lunch and learn ended, one of our bright new hires engaged me afterwards...&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:22 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;So, to play a little devil's advocate, take your oil rig example, and make it a mobile app&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;it may be impractical or impossible to keep a record of each client running your application&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;a user might run the app from multiple devices so you can't use their login&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:38 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;  &lt;span id="oc_nopreserve"&gt;:)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;cool&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;so&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;the mobile app would still need to be registered to identify it as some sort of key&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;we may need to know about the equipment they're using or other business data&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;that registration process would assign an ID to that equipment&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;it'd have to be linked to a user so its data can be reported consistently every time they check in&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;or if not to a user, some sort of hardware id.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:41 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;i was thinking more like a consumer application, without any central management to register new devices, but i suppose the software could connect to the server the first time it runs and obtain a permanent device ID&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;depending if it's acceptable to require them to be online when they start using it for the first time&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:44 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;even then, the local repository could be required to be updated with an account/device/user ID before syncing&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:46 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;so, i'll concede that there's almost always a way to avoid the guids&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:46 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;hah&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;yep&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;i agree!&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;though I assume a system like SharePoint would be a nightmare without GUIDs&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;another alternative is ranges of ID's&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;so this oil rig gets values 1-1 million, the next gets values of 2-3 million, but i dislike that for a bunch of reasons.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;but i've seen it done&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;at that point it turns the number into a smartcode, which i dislike.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:49 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;the other context i see them being useful is when you need uniqueness among several different kinds of entities, but i know there are alternative ways to do that too&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;guids just make it easy&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:50 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;easy... until you get to scale&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;and easy... if you're not the one in charge of index maintenance&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;and easy... if storage space is unlimited.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;and easy... if you can hide bad performance with iron&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;otherwise... easier(?) maybe  &lt;span id="oc_nopreserve"&gt;:)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:51 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;yeah, like i said, easy  &lt;span id="oc_nopreserve"&gt;:P&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:51 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;hahhah&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:51 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;anyway, i enjoyed the lunch and learn, thanks&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:51 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;thanks for coming! nice to "work" with you for the first time&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;next time you're at a big convention with SQL tracks, there's usually someone there who will RAIL on GUID's&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;Kimberly Tripp is a SQL MVP and author who gives a 90min anti-GUID presentation that will make you CRY either in despair or laughter&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:52 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;haha&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:52 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;depending on how much you've used GUIDs&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;heh&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:52 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;i haven't used them much personally&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:53 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;was that an interview question? If not... it should be  &lt;span id="oc_nopreserve"&gt;:)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:53 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;only really used them when coding against the TFS API or recently Microsoft CRM&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;however, i've read about the [theoretical] use of them in some contexts&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:53 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;yeah, as a result, SharePoint (and CRM) have different rules for treating database indexes and statistics and their own elaborate internal index maintenance plans&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:54 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;like then a client needs to generate an ID itself instead of letting the server/database do it&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;then -&amp;gt; when&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:54 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;that's a good scenario when GUID's could be helpful too&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;however&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;  &lt;span id="oc_nopreserve"&gt;:)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;in SQL 2012 there's a new feature called SEQUENCE&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;where an app can go and get the "next" value and use it to reliably insert their new primary key value.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;Oracle has a similar feature&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:56 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;yeah, that's pretty nice&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:56 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;sequences are the way to avoid having to insert, retrieve @@IDENTITY, then insert related tables, etc.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;can get a sequence out of a function, perform one transaction worth of inserts&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:57 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;is a particular sequence tied to a table or what?&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:57 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;nope&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:58 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;i'll read up on it, good stuff&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="Normalheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;William A.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:58 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="Normalcontent"&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; word-wrap: break-word;"&gt;welcome aboard man, have a great weekend too&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div id="ColorBandedheader"&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Segoe UI;"&gt;&lt;span style="color: #858585; word-wrap: break-word;"&gt;C.M.&lt;/span&gt; &lt;span style="color: #858585; text-align: right; white-space: nowrap;"&gt;1:58 PM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="ColorBandedcontent"&gt;
&lt;div id="imcontent"&gt;
&lt;span style="font-family: 'Segoe UI'; word-wrap: break-word;"&gt;you too, thanks&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=CBaJswHsPk0:iBj1RzQI2lQ:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=CBaJswHsPk0:iBj1RzQI2lQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/SqlTact/~4/CBaJswHsPk0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqltact.com/feeds/7150055343661405781/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqltact.com/2013/03/conversation-history-continuing-case.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/7150055343661405781?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/7150055343661405781?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SqlTact/~3/CBaJswHsPk0/conversation-history-continuing-case.html" title="Conversation History: The Continuing Case Against GUIDs" /><author><name>w</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.sqltact.com/2013/03/conversation-history-continuing-case.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUAQXo9eSp7ImA9WhBREUk.&quot;"><id>tag:blogger.com,1999:blog-2328222207349876984.post-4189241836166673318</id><published>2013-03-01T08:14:00.000-06:00</published><updated>2013-03-01T08:14:00.461-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-01T08:14:00.461-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tsql" /><category scheme="http://www.blogger.com/atom/ns#" term="int" /><category scheme="http://www.blogger.com/atom/ns#" term="date" /><category scheme="http://www.blogger.com/atom/ns#" term="math" /><title>YYYYMM Math</title><content type="html">I had a project recently where I had to do math on a number that represented a date, YYYYMM.&lt;br /&gt;
&lt;br /&gt;
For example, February 2013 would be stored as an integer, 201302.&lt;br /&gt;
&lt;br /&gt;
As an aside, YYYYMM makes WAY more sense than ever storing anything MMYYYY. &amp;nbsp;Why? &amp;nbsp;For one, it sorts correctly. &amp;nbsp;And the biggest reason - no need to worry about leading zeroes, and therefore the data can be stored as NUMERIC, not VARCHAR data. &lt;br /&gt;
&lt;br /&gt;
I needed to do month math on this data. For example, give me the previous month, six months ago, one year ago, nine months in the future, etc. &amp;nbsp;This gets tricky because though it is tempting to do -1, -6, -12, +9, the rollover of years does not work at all.&lt;br /&gt;
&lt;br /&gt;
The following function solves the problem.
&lt;br /&gt;
&lt;blockquote&gt;
&lt;pre class="brush: sql"&gt;ALTER FUNCTION dbo.[YearMonth_Math]
(
@Yearmonth int, @months smallint
)
RETURNS INT
AS
BEGIN
RETURN
 CASE WHEN @months THEN CASE --This case handles flipping January to the previous years December.
 WHEN convert(int, Right(@Yearmonth,2)) &amp;lt;= abs(@months) --will we need to flip a year?
 THEN convert(int,
  convert(char(4), Left(@Yearmonth,4) + (((@Months)) / 12)  - case when right(@YearMonth, 2) + (@months % 12) &amp;lt; 1 Then 1 else 0 end)
  + convert(char(2), right('0' +  convert(varchar(3), (right(@yearmonth, 2) + (@months % 12) 
  + case when right(@YearMonth, 2) + (@months % 12) &amp;lt; 1 Then 12 else 0 end)),2))
  )
  --Otherwise, this previous month calculation is very simple.
  ELSE @Yearmonth + @months
 END
 WHEN @months &amp;gt;0
 THEN CASE --This case handles flipping December to the next years January.
  WHEN 12 - convert(int, Right(@Yearmonth,2)) &amp;lt;= @months --will we need to flip a year?
  THEN convert(int,
   convert(char(4), left(@YearMonth,4) + ((@months + right(@yearMonth,2) -1) / 12) ) +   
   convert(char(2), right('0' + convert(varchar(3), (right(@YearMonth, 2) + (@months % 12) &amp;nbsp;
   - case when right(@YearMonth, 2) + (@months % 12) &amp;gt; 12 THen 12 else 0 end)),2))
   )
   --Otherwise, this previous month calculation is very simple.
   ELSE @Yearmonth + @months
  END
 ELSE @YearMonth
 END
END
&lt;/pre&gt;
&lt;/blockquote&gt;
Here's some testing to verify all the different possibilities. &lt;br /&gt;
&lt;blockquote&gt;
&lt;pre class="brush: sql"&gt;select  dbo.[YearMonth_Math] (201212,1), 201301
select  dbo.[YearMonth_Math] (201212,2), 201302
select  dbo.[YearMonth_Math] (201212,7), 201307
select  dbo.[YearMonth_Math] (201212,12), 201312
select  dbo.[YearMonth_Math] (201212,13), 201401
select  dbo.[YearMonth_Math] (201212,24), 201412
select  dbo.[YearMonth_Math] (201212,25), 201501
select  dbo.[YearMonth_Math] (201212,36), 201512
select  dbo.[YearMonth_Math] (201201,-1), 201112
select  dbo.[YearMonth_Math] (201201,-2), 201111
select  dbo.[YearMonth_Math] (201201,-7), 201106
select  dbo.[YearMonth_Math] (201201,-12), 201101
select  dbo.[YearMonth_Math] (201201,-13), 201012
select  dbo.[YearMonth_Math] (201201,-24), 201001
select  dbo.[YearMonth_Math] (201201,-25), 200912
select  dbo.[YearMonth_Math] (201212,-1), 201211
select  dbo.[YearMonth_Math] (201212,-2), 201210
select  dbo.[YearMonth_Math] (201212,-7), 201205
select  dbo.[YearMonth_Math] (201212,-12), 201112
select  dbo.[YearMonth_Math] (201212,-13), 201111
select  dbo.[YearMonth_Math] (201212,-24), 201012
select  dbo.[YearMonth_Math] (201212,-25), 201011
select  dbo.[YearMonth_Math] (201212,-36), 200912
select  dbo.[YearMonth_Math] (201206,1), 201207
select  dbo.[YearMonth_Math] (201206,-1), 201205
select  dbo.[YearMonth_Math] (201206,2), 201208
select  dbo.[YearMonth_Math] (201206,-2), 201204
select  dbo.[YearMonth_Math] (201201,1), 201202
select  dbo.[YearMonth_Math] (201201,13), 201302
select  dbo.[YearMonth_Math] (201201,25), 201402
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=54kLBl_8LJs:aDIxBZceJ_w:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/SqlTact?a=54kLBl_8LJs:aDIxBZceJ_w:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/SqlTact?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/SqlTact/~4/54kLBl_8LJs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.sqltact.com/feeds/4189241836166673318/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.sqltact.com/2013/03/yyyymm-math.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/4189241836166673318?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2328222207349876984/posts/default/4189241836166673318?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SqlTact/~3/54kLBl_8LJs/yyyymm-math.html" title="YYYYMM Math" /><author><name>w</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.sqltact.com/2013/03/yyyymm-math.html</feedburner:origLink></entry></feed>
