<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; System Stored Procedure sys.sp_tables</title>
	<atom:link href="http://blog.sqlauthority.com/2010/10/17/sql-server-system-stored-procedure-sys-sp_tables/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/10/17/sql-server-system-stored-procedure-sys-sp_tables/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Sat, 25 May 2013 01:31:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Bé Sâu</title>
		<link>http://blog.sqlauthority.com/2010/10/17/sql-server-system-stored-procedure-sys-sp_tables/#comment-386788</link>
		<dc:creator><![CDATA[Bé Sâu]]></dc:creator>
		<pubDate>Tue, 04 Dec 2012 13:30:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10569#comment-386788</guid>
		<description><![CDATA[Hi Mr Pinal

I&#039;m trying to learn more about system tables of SQL Server. And I get a problem with sysdiagrams. I can&#039;t find which table exists in a particular diagram? its content (diagram&#039;s image) is stored as binary format (column [Definition])

Please give me your opinions
Thanks so much,]]></description>
		<content:encoded><![CDATA[<p>Hi Mr Pinal</p>
<p>I&#8217;m trying to learn more about system tables of SQL Server. And I get a problem with sysdiagrams. I can&#8217;t find which table exists in a particular diagram? its content (diagram&#8217;s image) is stored as binary format (column [Definition])</p>
<p>Please give me your opinions<br />
Thanks so much,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pouliotp</title>
		<link>http://blog.sqlauthority.com/2010/10/17/sql-server-system-stored-procedure-sys-sp_tables/#comment-94284</link>
		<dc:creator><![CDATA[Pouliotp]]></dc:creator>
		<pubDate>Tue, 19 Oct 2010 20:09:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10569#comment-94284</guid>
		<description><![CDATA[Select Name from sys.table is faster but.]]></description>
		<content:encoded><![CDATA[<p>Select Name from sys.table is faster but.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PouliotP</title>
		<link>http://blog.sqlauthority.com/2010/10/17/sql-server-system-stored-procedure-sys-sp_tables/#comment-94283</link>
		<dc:creator><![CDATA[PouliotP]]></dc:creator>
		<pubDate>Tue, 19 Oct 2010 20:08:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10569#comment-94283</guid>
		<description><![CDATA[For the name Only : select name from sys.tables=37%
ANd 
EXEC sys.sp_tables=63%]]></description>
		<content:encoded><![CDATA[<p>For the name Only : select name from sys.tables=37%<br />
ANd<br />
EXEC sys.sp_tables=63%</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramdas</title>
		<link>http://blog.sqlauthority.com/2010/10/17/sql-server-system-stored-procedure-sys-sp_tables/#comment-94130</link>
		<dc:creator><![CDATA[Ramdas]]></dc:creator>
		<pubDate>Tue, 19 Oct 2010 02:07:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10569#comment-94130</guid>
		<description><![CDATA[Thanks for the tip, never used this stored procedure.
Thanks]]></description>
		<content:encoded><![CDATA[<p>Thanks for the tip, never used this stored procedure.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thevan</title>
		<link>http://blog.sqlauthority.com/2010/10/17/sql-server-system-stored-procedure-sys-sp_tables/#comment-93989</link>
		<dc:creator><![CDATA[thevan]]></dc:creator>
		<pubDate>Mon, 18 Oct 2010 08:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10569#comment-93989</guid>
		<description><![CDATA[Hello Sir,

                  I am a Beginner. I have One problem. I want to insert and update records using single stored procedure.

I have One table called Tbl1. It contains three columns such as ExamID, SetUpDate, ExamNumber. 

ExamID is an Identity Column. 
When I insert the SetUpDate, the ExamNumber will be automatically updated like Oct 2010 01(based on SetUpDate). In that Oct 2010 is the Month and Year of the SetUpDate and 01 is the automatically generated number. 

Likewise when i insert another record, the examnumber will be generated as Oct 2010 02 and so on..

Suppose if we select setupdate as Nov 2010. then the exam number will be updated as Nov 2010 01, 02 and so on...

I have write one procedure but it is not working.

Create procedure [dbo].[sp_InsertUpdate]
(
@SetupDate datetime,
@ExamNumber varchar(20)
)

as
begin
insert into OnlineExamHdr
(
SetupDate,
ExamNumber
)
values
(
@SetupDate,
@ExamNumber
)

declare @ExamID int
declare @datept varchar(20)
declare @date varchar(20)
declare @num int

set @date = (select ExamSetupdate from Tbl1 where ExamID = @ExamID)
set @datept = convert(varchar(4), @date,100)  + convert(varchar(4),year(@date))
set @num = (select substring(Examnumber, 10, len(Examnumber)) as num from Tbl1 where Examnumber = (select max(Examnumber) from Tbl1 where Examnumber like @datept+&#039;%&#039;))

update Tbl1 
set ExamNumber = (select(@datept + space(2) + convert(nvarchar(50), (right(100 + (@num + 1), 2)))))
where ExamID = @ExamID

end

Please anyone give the solution.]]></description>
		<content:encoded><![CDATA[<p>Hello Sir,</p>
<p>                  I am a Beginner. I have One problem. I want to insert and update records using single stored procedure.</p>
<p>I have One table called Tbl1. It contains three columns such as ExamID, SetUpDate, ExamNumber. </p>
<p>ExamID is an Identity Column.<br />
When I insert the SetUpDate, the ExamNumber will be automatically updated like Oct 2010 01(based on SetUpDate). In that Oct 2010 is the Month and Year of the SetUpDate and 01 is the automatically generated number. </p>
<p>Likewise when i insert another record, the examnumber will be generated as Oct 2010 02 and so on..</p>
<p>Suppose if we select setupdate as Nov 2010. then the exam number will be updated as Nov 2010 01, 02 and so on&#8230;</p>
<p>I have write one procedure but it is not working.</p>
<p>Create procedure [dbo].[sp_InsertUpdate]<br />
(<br />
@SetupDate datetime,<br />
@ExamNumber varchar(20)<br />
)</p>
<p>as<br />
begin<br />
insert into OnlineExamHdr<br />
(<br />
SetupDate,<br />
ExamNumber<br />
)<br />
values<br />
(<br />
@SetupDate,<br />
@ExamNumber<br />
)</p>
<p>declare @ExamID int<br />
declare @datept varchar(20)<br />
declare @date varchar(20)<br />
declare @num int</p>
<p>set @date = (select ExamSetupdate from Tbl1 where ExamID = @ExamID)<br />
set @datept = convert(varchar(4), @date,100)  + convert(varchar(4),year(@date))<br />
set @num = (select substring(Examnumber, 10, len(Examnumber)) as num from Tbl1 where Examnumber = (select max(Examnumber) from Tbl1 where Examnumber like @datept+&#8217;%'))</p>
<p>update Tbl1<br />
set ExamNumber = (select(@datept + space(2) + convert(nvarchar(50), (right(100 + (@num + 1), 2)))))<br />
where ExamID = @ExamID</p>
<p>end</p>
<p>Please anyone give the solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suresh</title>
		<link>http://blog.sqlauthority.com/2010/10/17/sql-server-system-stored-procedure-sys-sp_tables/#comment-93848</link>
		<dc:creator><![CDATA[suresh]]></dc:creator>
		<pubDate>Sun, 17 Oct 2010 17:24:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10569#comment-93848</guid>
		<description><![CDATA[Dear sir,
      I executed all the sql statements. But,i have one doubt...How did u compare these 2 queries.(See the queries in the Execution plan window) Both are not same...]]></description>
		<content:encoded><![CDATA[<p>Dear sir,<br />
      I executed all the sql statements. But,i have one doubt&#8230;How did u compare these 2 queries.(See the queries in the Execution plan window) Both are not same&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
