<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Terry Apodaca &#187; SQL</title>
	<atom:link href="http://www.terryapodaca.com/category/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.terryapodaca.com</link>
	<description>A Son, a Husband, a Father, a Web Designer &#38; Developer, Sports Nut ( Ŧ Red Raiders, Cowboys, Rangers, Mavericks and the Stars)...and yes, in that order.</description>
	<lastBuildDate>Fri, 13 Jan 2012 22:54:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>List of Open Source/PHP CMS</title>
		<link>http://www.terryapodaca.com/2011/01/19/list-of-open-sourcephp-cms/</link>
		<comments>http://www.terryapodaca.com/2011/01/19/list-of-open-sourcephp-cms/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 01:21:50 +0000</pubDate>
		<dc:creator>Terry Apodaca</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programing Languages]]></category>
		<category><![CDATA[SilverStripe]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Service]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[content management system]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.terryapodaca.com/?p=1071</guid>
		<description><![CDATA[I&#8217;ve seen a few recent blogs ask where are all the good PHP and/or Open Source CMSs? I&#8217;ve even seen a few touch the surface of this subject: The Great CMS Roundup, Judging Five Open Source CMS. EDIT: and Matt has pointed me to a nice site that might list just about all of them: [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.terryapodaca.com/wp-content/uploads/2011/01/cms.png" rel="lightbox[1071]"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/cms.png" alt="" title="cms" width="500" height="200" class="aligncenter size-full wp-image-1073" /></a><br />
I&#8217;ve seen a few recent blogs ask where are all the good PHP and/or Open Source CMSs?  I&#8217;ve even seen a few touch the surface of this subject: <a href="http://www.webbower.com/blog/the-great-cms-roundup/">The Great CMS Roundup</a>, <a href="http://cmsreport.com/content/2011/01/judging-five-open-source-content-management-systems">Judging Five Open Source CMS</a>.  EDIT: and Matt has pointed me to a nice site that might list just about all of them: <a href="http://php.opensourcecms.com/">http://php.opensourcecms.com/</a></p>
<p>I am not going to do a &#8216;Roundup&#8217; because I am not going to review every single one of them.  I am not going to even list features, nor am I going to show what each one supports.  All I want to do is put together a nice LIST of all the PHP based CMSs out there&#8230;so please, if I missed one that you know of&#8230;leave a comment for me.</p>
<p>Here is your list, in no particular order other than by maybe popularity and my personal preference.  It can be argued between Joomla, WordPress and Drupal about which is in the lead&#8230;.but either way&#8230;here they are:</p>
<ul class="cmslist">
<li><a href="http://www.silverstripe.org/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/silverstripe.gif" alt="SilverStripe" title="SilverStripe" width="48" height="48" class="size-full wp-image-1082" /></a></li>
<li><a href="http://drupal.org/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/drupal.jpg" alt="Drupal" title="Drupal" width="48" height="48" class="size-full wp-image-1077" /></a></li>
<li><a href="http://www.joomla.org/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/joomla.jpg" alt="Joomla" title="Joomla" width="48" height="48" class="size-full wp-image-1075" /></a></li>
<li><a href="http://get-simple.info/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/getsimple_logo_alt.png" alt="GetSimple" title="GetSimple" width="48" height="48" class="alignnone size-full wp-image-1098" /></a></li>
<li><a href="http://www.madebyfrog.com/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/frog.jpg" alt="Frog" title="Frog" width="48" height="48" class="alignnone size-full wp-image-1094" /></a></li>
<li><a href="http://www.wordpress.org"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/wordpress.png" alt="WordPress" title="WordPress" width="48" height="48" class="size-full wp-image-1078" /></a></li>
<li><a href="http://expressionengine.com/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/expressionengine_logo.png" alt="ExpressionEngine" title="ExpressionEngine" width="48" height="48" class="alignnone size-full wp-image-1091" /></a></li>
<li><a href="http://www.concrete5.org/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/concrete5.png" alt="Concrete5" title="Concrete5"  width="48" height="48" class="alignnone size-full wp-image-1087" /></a></li>
<li><a href="http://www.cmsmadesimple.org/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/cmsmadesimple.jpg" alt="CMSMadeSimple" title="CMSMadeSimple" width="48" height="48" class="alignnone size-full wp-image-1088" /></a></li>
<li><a href="http://www.contao.org/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/Contao.jpg" alt="Contao" title="Contao" width="48" height="48" class="alignnone size-full wp-image-1090" /></a></li>
<li><a href="http://modxcms.com/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/modx.png" alt="Modx" title="Modx" width="48" height="48" class="alignnone size-full wp-image-1092" /></a></li>
<li><a href="http://www.phirecms.org/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/phire.jpg" alt="Phire" title="Phire" width="48" height="48" class="alignnone size-full wp-image-1095" /></a></li>
<li><a href="http://www.tomatocms.com/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/tomatocms.png" alt="TomatoCMS" title="TomatoCMS" width="48" height="48" class="alignnone size-full wp-image-1096" /></a></li>
<li><a href="http://habariproject.org/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/habari_logo_normal.png" alt="Habari" title="Habari" width="48" height="48" class="alignnone size-full wp-image-1097" /></a></li>
<li><a href="http://croogo.org/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/1260843589croogo_logo0000000000.jpg" alt="Croogo" title="Croogo" width="48" height="48" class="alignnone size-full wp-image-1099" /></a></li>
<li><a href="http://typo3.com/"><img src="http://www.terryapodaca.com/wp-content/uploads/2011/01/typo3-150x150.png" alt="" title="typo3" width="48" height="48" class="alignnone size-full wp-image-1112" /></a></li>
</ul>
<hr style="clear:both;" />
<p>I will be adding to this, if/when someone suggests another one because I know there are hundreds of them out there.  So keep this bookmarked!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryapodaca.com/2011/01/19/list-of-open-sourcephp-cms/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Reset or Reseed SQL Server IDENTITY Column</title>
		<link>http://www.terryapodaca.com/2008/03/04/reset-or-reseed-sql-server-identity-column/</link>
		<comments>http://www.terryapodaca.com/2008/03/04/reset-or-reseed-sql-server-identity-column/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 21:48:32 +0000</pubDate>
		<dc:creator>Terry Apodaca</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.terryapodaca.com/2008/03/04/reset-or-reseed-sql-server-identity-column/</guid>
		<description><![CDATA[I am sure this is well known by most of you, but I am a noob! and want to help other noobs out there that are like me. I needed to Create a new Cube today, and in the process I figured we needed an &#8216;UNKNOWN&#8217; row for all those Unknown situations that could pop [...]]]></description>
			<content:encoded><![CDATA[<p>I am sure this is well known by most of you, but I am a noob!  and want to help other noobs out there that are like me.  </p>
<p>I needed to Create a new Cube today, and in the process I figured we needed an &#8216;UNKNOWN&#8217; row for all those Unknown situations that could pop up in a Pivot table.  Well, when you create a Cube, most of your Dimension and Fact tables are driven off of Keys that you set as Identity.  Or at least this is how MS came to our shop and showed us how to do it.</p>
<p>Now, the problem here is Identity is READ-ONLY so our staging tables and Views could not properly add a &#8216;UNKNOWN&#8217; with a regular INSERT when trying to force that Identity value to -1.  Why negative one?  So that you will ALWAYS know that this is either an UNKNOWN or N/A.</p>
<p>So, here is what we did within the initial load of one of the Dimension tables:</p>
<p><code>TRUNCATE TABLE PM_DWT.dbo.Dim_Partnership<br />
SET IDENTITY_INSERT PM_DWT.dbo.Dim_Partnership ON<br />
GO<br />
INSERT INTO PM_DWT.dbo.Dim_Partnership (Partnership_Key,Partner_ID,Partnership_Name)<br />
	VALUES (-1,-1,'N/A')<br />
GO<br />
SET IDENTITY_INSERT PM_DWT.dbo.Dim_Partnership OFF<br />
GO<br />
DBCC CHECKIDENT (Dim_Partnership, RESEED, 0)<br />
GO<br />
INSERT INTO PM_DWT.dbo.Dim_Partnership (Partner_ID, Partnership_Name)<br />
	SELECT<br />
		 Partner_ID<br />
		,Partner_Name<br />
	FROM PM_Cluster.dbo.v_Dim_Partnership<br />
	ORDER BY Partner_ID<br />
GO</code></p>
<p>The above code will insert your first record for -1 and UNKNOWN.  Then it will enable the Identity column again.  What happens here though, is the Identity column see an entry, so it naturally wants to add one, so that your next value inserted will actually have 2.  We want to force it to restart even though we inserted a record. </p>
<p><code>DBCC CHECKIDENT (Dim_Partnership, RESEED, 0)<br />
GO</code> </p>
<p>Will do just that&#8230;so that the main INSERT will now begin at 1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryapodaca.com/2008/03/04/reset-or-reseed-sql-server-identity-column/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SQL Server Reporting Services &#8211; Extract RDL Files</title>
		<link>http://www.terryapodaca.com/2008/02/05/sql-server-reporting-services-extract-rdl-files/</link>
		<comments>http://www.terryapodaca.com/2008/02/05/sql-server-reporting-services-extract-rdl-files/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 22:45:08 +0000</pubDate>
		<dc:creator>Terry Apodaca</dc:creator>
				<category><![CDATA[Free Software]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.terryapodaca.com/2008/02/05/sql-server-reporting-services-extract-rdl-files/</guid>
		<description><![CDATA[If you have ever needed to extract the .rdl file from SQL Server Reporting Server, it&#8217;s not very easy. The physical .rdl (Report Definition List) is not stored anywhere on the server file system. It&#8217;s stored in the Catalog table inside Report Server. So, I am sure there are several ways to get this&#8230;but I [...]]]></description>
			<content:encoded><![CDATA[<p>If you have ever needed to extract the .rdl file from SQL Server Reporting Server, it&#8217;s not very easy.  The physical .rdl (Report Definition List) is not stored anywhere on the server file system.  It&#8217;s stored in the Catalog table inside Report Server.  So, I am sure there are several ways to get this&#8230;but I was pressed for time and <a href="http://blog.stevienova.com/2007/08/25/reporting-services-scripter-sync-reporting-services-instances-and-objects/">asked someone</a> that I knew was a lot more knowledgeable on the subject.  Steve gave me this link: <a href="http://www.sqldbatips.com/showarticle.asp?ID=62">Reporting Services Scripter</a></p>
<p>Which has solved all my issues.  Now it&#8217;s time to give it a run!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryapodaca.com/2008/02/05/sql-server-reporting-services-extract-rdl-files/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SQL: First and Last Day of Year</title>
		<link>http://www.terryapodaca.com/2008/01/29/sql-first-and-last-day-of-year/</link>
		<comments>http://www.terryapodaca.com/2008/01/29/sql-first-and-last-day-of-year/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 14:57:34 +0000</pubDate>
		<dc:creator>Terry Apodaca</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.terryapodaca.com/2008/01/29/sql-first-and-last-day-of-year/</guid>
		<description><![CDATA[These lines of code will get you the First and Last day of the current year. SQL: SELECT DATEADD(yy, DATEDIFF(yy,0,getdate()), 0),'First Day of the Year' UNION SELECT DATEADD(dd,-1,DATEADD(yy,0,DATEADD(yy,DATEDIFF(yy,0,getdate())+1,0))),'Last Day of the Year' Results: 2008-01-01 00:00:00.000 First Day of the Year 2008-12-31 00:00:00.000 Last Day of the Year]]></description>
			<content:encoded><![CDATA[<p>These lines of code will get you the First and Last day of the current year.</p>
<p>SQL:<br />
<code><br />
SELECT DATEADD(yy, DATEDIFF(yy,0,getdate()), 0),'First Day of the Year'<br />
UNION<br />
SELECT DATEADD(dd,-1,DATEADD(yy,0,DATEADD(yy,DATEDIFF(yy,0,getdate())+1,0))),'Last Day of the Year'<br />
</code></p>
<p>Results:<br />
<code>2008-01-01 00:00:00.000	First Day of the Year<br />
2008-12-31 00:00:00.000	Last Day of the Year</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryapodaca.com/2008/01/29/sql-first-and-last-day-of-year/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>SQL Dates &#8211; First, Current, Last Day of Month</title>
		<link>http://www.terryapodaca.com/2008/01/28/sql-dates-first-current-last-day-of-month/</link>
		<comments>http://www.terryapodaca.com/2008/01/28/sql-dates-first-current-last-day-of-month/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 19:59:41 +0000</pubDate>
		<dc:creator>Terry Apodaca</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.terryapodaca.com/2008/01/28/sql-dates-first-current-last-day-of-month/</guid>
		<description><![CDATA[I can&#8217;t give you a full tutorial on all things Dates when it comes to SQL, but I can show you how I solved a date task for a project I am now finishing up. This project includes finding data between these dates: First Day of Last Month Current Day of Last Month &#8211; so [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t give you a full tutorial on all things Dates when it comes to SQL, but I can show you how I solved a date task for a project I am now finishing up.  This project includes finding data between these dates:</p>
<p>First Day of Last Month<br />
Current Day of Last Month &#8211; so today&#8217;s day &#8211; 28 &#8211; but of last month<br />
Last Day of Last Month</p>
<p>First Day of Month<br />
Current Day of Month &#8211; Today<br />
Last Day of Month</p>
<p>First Day of Next Month<br />
Current Day of Next Month &#8211; same, today&#8217;s day of the month for next month<br />
Last Day of Next Month</p>
<p>Oh, I also needed to get this month, for last year with the three same time frames.  First day of the current month of last year, last day of current month of last year, and today&#8217;s day of last year.  </p>
<p>First off, it&#8217;s relatively easy to search the interweb and use the first thing that pops up and gives you the answer.  But when I tried that, the code was long, ugly, and just wasn&#8217;t to easy to maintain.  So, I started with the most simple of all:</p>
<p><code><br />
SELECT convert(varchar,DATEADD(YEAR,-1,DATEADD(MONTH,DATEDIFF(MONTH,0,getdate()),0)),101),'First Day of This Month Last Year'<br />
UNION<br />
SELECT convert(varchar,DATEADD(YEAR,-1,DATEADD(MONTH,0,getdate())),101),'Today Last Year'<br />
UNION<br />
SELECT convert(varchar,DATEADD(YEAR,-1,DATEADD(MONTH,DATEDIFF(MONTH,-1,getdate()),-1)),101),'Last Day of This Month Last Year'<br />
UNION<br />
SELECT convert(varchar,DATEADD(MONTH,-1,DATEADD(MONTH,DATEDIFF(MONTH,0,getdate()),0)),101),'First Day of Last Month'<br />
UNION<br />
SELECT convert(varchar,DATEADD(MONTH,-1,getdate()),101),'This Time Last Month'<br />
UNION<br />
SELECT convert(varchar,DATEADD(MONTH,DATEDIFF(MONTH,0,getdate()),-1),101),'Last Day of Last Month'<br />
UNION<br />
SELECT convert(varchar,DATEADD(MONTH,DATEDIFF(MONTH,0,getdate()),0),101),'First Day of This Month'<br />
UNION<br />
SELECT convert(varchar,getdate(),101),'Today'<br />
UNION<br />
SELECT convert(varchar,DATEADD(MONTH,DATEDIFF(MONTH,-1,getdate()),-1),101),'Last Day of This Month'<br />
UNION<br />
SELECT convert(varchar,DATEADD(MONTH,DATEDIFF(MONTH,-1,getdate()),0),101),'First Day of Next Month'<br />
UNION<br />
SELECT convert(varchar,DATEADD(MONTH,+1,getdate()),101),'This Time Next Month'<br />
UNION<br />
SELECT convert(varchar,DATEADD(MONTH,+1,DATEADD(MONTH,DATEDIFF(MONTH,-1,getdate()),-1)),101),'Last Day of Next Month'<br />
</code></p>
<p>Results:<br />
<code><br />
01/01/2007	First Day of This Month Last Year<br />
01/29/2007	Today Last Year<br />
01/31/2007	Last Day of This Month Last Year<br />
12/01/2007	First Day of Last Month<br />
12/29/2007	This Time Last Month<br />
12/31/2007	Last Day of Last Month<br />
01/01/2008	First Day of This Month<br />
01/29/2008	Today<br />
01/31/2008	Last Day of This Month<br />
02/01/2008	First Day of Next Month<br />
02/29/2008	This Time Next Month<br />
02/29/2008	Last Day of Next Month<br />
</code></p>
<p>I hope many will find this useful.   Of course, you&#8217;ll most likely want to set variables with these&#8230;as your SQL could get very long and unreadable if you had to copy and paste these over and over for BETWEENs or some other similar date range.  </p>
<p>** Please feel free to post&#8230;I&#8217;d like to know what others do, if there are more efficient ways, or newer ways.  I am a relative Noob at SQL, so I know this can be done better.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.terryapodaca.com/2008/01/28/sql-dates-first-current-last-day-of-month/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.378 seconds -->

