<?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>Jiramot.info &#187; tsql</title>
	<atom:link href="http://www.jiramot.info/tag/tsql/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jiramot.info</link>
	<description>Developer&#039;s Life</description>
	<lastBuildDate>Mon, 06 Feb 2012 08:49:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Determining if a Date is a Weekday in T-SQL</title>
		<link>http://www.jiramot.info/determining-if-a-date-is-a-weekday-in-t-sql</link>
		<comments>http://www.jiramot.info/determining-if-a-date-is-a-weekday-in-t-sql#comments</comments>
		<pubDate>Wed, 10 Mar 2010 11:25:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[tsql]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=508</guid>
		<description><![CDATA[ create function fn_IsWeekDay ( @date datetime ) returns bit as begin declare @dtfirst int declare @dtweek int declare @iswkday bit set @dtfirst = @@datefirst - 1 set @dtweek = datepart(weekday, @date) - 1 if (@dtfirst + @dtweek) % 7 not in (5, 6) set @iswkday = 1 --business day else set @iswkday = [...]]]></description>
			<content:encoded><![CDATA[<pre>
create function fn_IsWeekDay
(
    @date datetime
)
returns bit
as
begin 

    declare @dtfirst int
    declare @dtweek int
    declare @iswkday bit 

    set @dtfirst = @@datefirst - 1
    set @dtweek = datepart(weekday, @date) - 1

    if (@dtfirst + @dtweek) % 7 not in (5, 6)
        set @iswkday = 1 --business day
    else
        set @iswkday = 0 --weekend

    return @iswkday
end
</pre>
<p>source <a target="_blank" rel="nofollow" href="http://www.jiramot.info/goto/http://ryanfarley.com/blog/archive/2005/02/14/1685.aspx" >http://ryanfarley.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/determining-if-a-date-is-a-weekday-in-t-sql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[TSQL]How to get list of Table in MS-SQL</title>
		<link>http://www.jiramot.info/tsqlhow-to-get-list-of-table-in-ms-sql</link>
		<comments>http://www.jiramot.info/tsqlhow-to-get-list-of-table-in-ms-sql#comments</comments>
		<pubDate>Fri, 05 Feb 2010 07:52:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[tsql]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=503</guid>
		<description><![CDATA[<p> USE [TABLE_NAME] SELECT * FROM sys.Tables ORDER BY NAME </p> ]]></description>
			<content:encoded><![CDATA[<blockquote><p>
USE [TABLE_NAME]<br />
SELECT *<br />
FROM sys.Tables<br />
ORDER BY NAME
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/tsqlhow-to-get-list-of-table-in-ms-sql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List all the Stored Procedures of a Database and their Definitions using T-SQL in SQL Server 2005/2008</title>
		<link>http://www.jiramot.info/list-all-the-stored-procedures-of-a-database-and-their-definitions-using-t-sql-in-sql-server-20052008</link>
		<comments>http://www.jiramot.info/list-all-the-stored-procedures-of-a-database-and-their-definitions-using-t-sql-in-sql-server-20052008#comments</comments>
		<pubDate>Thu, 04 Feb 2010 11:56:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[tsql]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=501</guid>
		<description><![CDATA[ <p>SELECT obj.Name as SPName,</p> <p>modu.definition as SPDefinition,</p> <p>obj.create_date as SPCreationDate</p> <p>FROM sys.sql_modules modu</p> <p>INNER JOIN sys.objects obj</p> <p>ON modu.object_id = obj.object_id</p> <p>WHERE obj.type = &#8216;P&#8217; </p> ]]></description>
			<content:encoded><![CDATA[<blockquote>
<p>SELECT obj.Name as SPName,</p>
<p>modu.definition as SPDefinition,</p>
<p>obj.create_date as SPCreationDate</p>
<p>FROM sys.sql_modules modu</p>
<p>INNER JOIN sys.objects obj</p>
<p>ON modu.object_id = obj.object_id</p>
<p>WHERE obj.type = &#8216;P&#8217;
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/list-all-the-stored-procedures-of-a-database-and-their-definitions-using-t-sql-in-sql-server-20052008/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Change column name in table</title>
		<link>http://www.jiramot.info/sql-change-column-name-in-table</link>
		<comments>http://www.jiramot.info/sql-change-column-name-in-table#comments</comments>
		<pubDate>Wed, 02 Dec 2009 05:29:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tsql]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=457</guid>
		<description><![CDATA[<p>Using the Query Analyzer may not be the right way always, you can use the SQL syntax as given below, if you are unable to have access to use the query analyzer</p> <p>For Oracle 9i, the syntax is : ALTER TABLE table_name RENAME COLUMN old_name to new_name;</p> <p>For Microsoft SQL the syntax is : [...]]]></description>
			<content:encoded><![CDATA[<p><span>Using the Query Analyzer may not be the right way always, you can use the SQL syntax as given below, if you are unable to have access to use the query analyzer</p>
<p>For Oracle 9i, the syntax is :<br />
ALTER TABLE table_name<br />
RENAME COLUMN old_name to new_name;</p>
<p>For Microsoft SQL the syntax is :<br />
EXEC sp_rename &#8216;Table.[OldColumnName]&#8216;, NewColumnName, &#8216;COLUMN&#8217;</p>
<p>*Note here the alst terms &#8216;COLUMN&#8217; is a must.</p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/sql-change-column-name-in-table/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

