<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming</id>
  <title type="text">microsoft.public.sqlserver.programming Google Group</title>
  <subtitle type="text">
  Microsoft SQL Server newsgroup.
  </subtitle>
  <link href="/group/microsoft.public.sqlserver.programming/feed/atom_v1_0_msgs.xml" rel="self" title="microsoft.public.sqlserver.programming feed"/>
  <updated>2009-11-26T23:33:40Z</updated>
  <generator uri="http://groups.google.com" version="1.99">Google Groups</generator>
  <entry>
  <author>
  <name>TheSQLGuru</name>
  <email>kgbo...@earthlink.net</email>
  </author>
  <updated>2009-11-26T23:33:40Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/49046188c32d950a/072b60e92fa39bce?show_docid=072b60e92fa39bce</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/49046188c32d950a/072b60e92fa39bce?show_docid=072b60e92fa39bce"/>
  <title type="text">Re: Interview question...</title>
  <summary type="html" xml:space="preserve">
  I have been asked by several of my clients to do technical interviews for &lt;br&gt; them and I use the same method Kalen. I want to see what the candidate can &lt;br&gt; come up with given incomplete or nebulous information - which is exactly &lt;br&gt; what they will get in the real world.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Farmer</name>
  <email>some...@somewhere.com</email>
  </author>
  <updated>2009-11-26T23:26:56Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/5f8c4d68af3bbfed/dcf5a8acddad604d?show_docid=dcf5a8acddad604d</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/5f8c4d68af3bbfed/dcf5a8acddad604d?show_docid=dcf5a8acddad604d"/>
  <title type="text">Interesting observation: new SQL time machine! :)</title>
  <summary type="html" xml:space="preserve">
  Interesting observation: new SQL time machine! :) &lt;br&gt; Run this several times and note that sometimes the first value is greater than the second! &lt;br&gt; I thought that these should be the same. &lt;br&gt; I understand that it&#39;s due to the way datetime rounds to 3, 7 or 0. &lt;br&gt; It is just interesting to note! &lt;br&gt; DECLARE @v datetime = SYSDATETIME()
  </summary>
  </entry>
  <entry>
  <author>
  <name>Michael C</name>
  <email>m...@nospam.com</email>
  </author>
  <updated>2009-11-26T23:16:06Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/f0ef82f4f19ac94b?show_docid=f0ef82f4f19ac94b</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/f0ef82f4f19ac94b?show_docid=f0ef82f4f19ac94b"/>
  <title type="text">Re: Why can&#39;t recursive queries contain...?</title>
  <summary type="html" xml:space="preserve">
  Again, yes I know. That is why someone would need to write a linq database. &lt;br&gt; Sounds like a gray area to me. Certainly linq could be optimised by an &lt;br&gt; optimiser in the same way sql is. &lt;br&gt; I have provided a code sample (check back through the posts, did you miss &lt;br&gt; it?) but as I said I am not going to install sql2008 just to write some
  </summary>
  </entry>
  <entry>
  <author>
  <name>Michael C</name>
  <email>m...@nospam.com</email>
  </author>
  <updated>2009-11-26T23:12:29Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/26cf7054bfe514ed?show_docid=26cf7054bfe514ed</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/26cf7054bfe514ed?show_docid=26cf7054bfe514ed"/>
  <title type="text">Re: Why can&#39;t recursive queries contain...?</title>
  <summary type="html" xml:space="preserve">
  Sounds a lot like sqlserver :-))) &lt;br&gt; Don&#39;t worry, although I&#39;m no expert I know how to write fairly efficient &lt;br&gt; sql. &lt;br&gt; Makes sense but it is certainly a gray area now we have linq and sqlserver &lt;br&gt; has procedural commands. &lt;br&gt; Michael
  </summary>
  </entry>
  <entry>
  <author>
  <name>Erland Sommarskog</name>
  <email>esq...@sommarskog.se</email>
  </author>
  <updated>2009-11-26T23:12:25Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/ca658af9d0a9786a/05ce216e456929d6?show_docid=05ce216e456929d6</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/ca658af9d0a9786a/05ce216e456929d6?show_docid=05ce216e456929d6"/>
  <title type="text">Re: Country &gt; Region</title>
  <summary type="html" xml:space="preserve">
  I would do this with a CountryCode and a RegionCode as key in Regions, &lt;br&gt; and also use the two colunm-key as foreign key. I don&#39;t know how you &lt;br&gt; define your regions, but there is an ISO standard for that as well, &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://www.iso.org/iso/country_codes/iso_3166_databases.htm&quot;&gt;[link]&lt;/a&gt;.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Erland Sommarskog</name>
  <email>esq...@sommarskog.se</email>
  </author>
  <updated>2009-11-26T23:07:44Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/95fdfbe552f1e0a2/aba06dbcfc152503?show_docid=aba06dbcfc152503</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/95fdfbe552f1e0a2/aba06dbcfc152503?show_docid=aba06dbcfc152503"/>
  <title type="text">Re: Localized Tables</title>
  <summary type="html" xml:space="preserve">
  That&#39;s the country code. You should use the language code in the table. &lt;br&gt; Certainly this is an issue on which there is more tha one opinion- &lt;br&gt; Yes, it may change, and I certainly think that primary keys should be &lt;br&gt; immutable. But I think that common codes likes country codes or language &lt;br&gt; codes can count as immutable. And country codes can definitely change.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Erland Sommarskog</name>
  <email>esq...@sommarskog.se</email>
  </author>
  <updated>2009-11-26T23:01:58Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/49046188c32d950a/c3998c5aeeacf50f?show_docid=c3998c5aeeacf50f</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/49046188c32d950a/c3998c5aeeacf50f?show_docid=c3998c5aeeacf50f"/>
  <title type="text">Re: Interview question...</title>
  <summary type="html" xml:space="preserve">
  The difficulty with this is that the candidate may think that he is not &lt;br&gt; in position to ask questions. This is even more accentuated over the &lt;br&gt; phone. True, the fact that the candidate has/does not have the courage &lt;br&gt; to ask questions, may be as revealing about his suitability for the &lt;br&gt; position than anything else. But I think it is a little mean if the
  </summary>
  </entry>
  <entry>
  <author>
  <name>Plamen Ratchev</name>
  <email>pla...@sqlstudio.com</email>
  </author>
  <updated>2009-11-26T22:37:51Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/2fe18b912d4d149c/86e8f908ab101242?show_docid=86e8f908ab101242</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/2fe18b912d4d149c/86e8f908ab101242?show_docid=86e8f908ab101242"/>
  <title type="text">Re: Wonder how to do nested logic</title>
  <summary type="html" xml:space="preserve">
  You can use recursive CTE: &lt;br&gt; CREATE TABLE Items ( &lt;br&gt; item VARCHAR(10) NOT NULL PRIMARY KEY, &lt;br&gt; superceder VARCHAR(10) REFERENCES Items(item)); &lt;br&gt; INSERT INTO Items VALUES(&#39;ITEM1&#39;, NULL); &lt;br&gt; INSERT INTO Items VALUES(&#39;ITEM2&#39;, &#39;ITEM1&#39;); &lt;br&gt; INSERT INTO Items VALUES(&#39;ITEM3&#39;, &#39;ITEM2&#39;); &lt;br&gt; INSERT INTO Items VALUES(&#39;ITEM4&#39;, NULL);
  </summary>
  </entry>
  <entry>
  <author>
  <name>Finny</name>
  <email>finny...@yahoo.com</email>
  </author>
  <updated>2009-11-26T21:53:44Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/2fe18b912d4d149c/4e8aa01a2eacd6ea?show_docid=4e8aa01a2eacd6ea</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/2fe18b912d4d149c/4e8aa01a2eacd6ea?show_docid=4e8aa01a2eacd6ea"/>
  <title type="text">Wonder how to do nested logic</title>
  <summary type="html" xml:space="preserve">
  Hello I am trying rank several items based on what items supercede &lt;br&gt; them. &lt;br&gt; Table is simple like this: &lt;br&gt; ITEM SUPERCEDER &lt;br&gt; ITEM1 &lt;br&gt; ITEM2 ITEM1 &lt;br&gt; ITEM3 ITEM2 &lt;br&gt; ITEM4 &lt;br&gt; ITEM5 ITEM4 &lt;br&gt; ITEM6 ITEM5 &lt;br&gt; In this case an e.g is item6 is superceded by item5 which in turn is
  </summary>
  </entry>
  <entry>
  <author>
  <name>Russell Fields</name>
  <email>russellfie...@nomail.com</email>
  </author>
  <updated>2009-11-26T21:15:36Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/888f406027751ec3/7a1229980435727d?show_docid=7a1229980435727d</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/888f406027751ec3/7a1229980435727d?show_docid=7a1229980435727d"/>
  <title type="text">Re: Question on Triggers</title>
  <summary type="html" xml:space="preserve">
  Peter, &lt;br&gt; If the trigger fires, it can either execute code directly or it can execute &lt;br&gt; a stored procedure. Cross database does have security issues, but Erland &lt;br&gt; Sommarskog&#39;s article discusses all the ways that you can get this to work, &lt;br&gt; with the pros and cons of each. &lt;br&gt; Ownership chains do not work between databases unless you have specifically
  </summary>
  </entry>
  <entry>
  <author>
  <name>Jeffrey Williams</name>
  <email>jeff.williams3...@verizon.net</email>
  </author>
  <updated>2009-11-26T21:07:14Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/888f406027751ec3/e7ffc1273e1e504f?show_docid=e7ffc1273e1e504f</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/888f406027751ec3/e7ffc1273e1e504f?show_docid=e7ffc1273e1e504f"/>
  <title type="text">Re: Question on Triggers</title>
  <summary type="html" xml:space="preserve">
  Lookup EXECUTE AS in books online. I don&#39;t think you need this - but if you &lt;br&gt; have to use a different user context to execute the procedure, that will &lt;br&gt; work. &lt;br&gt; You don&#39;t actually need the stored procedure in DB2 - you should be able to &lt;br&gt; create a stored procedure in DB1 that updates the table in DB2. The user is
  </summary>
  </entry>
  <entry>
  <author>
  <name>Peter Newman</name>
  <email>peternew...@discussions.microsoft.com</email>
  </author>
  <updated>2009-11-26T20:28:01Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/888f406027751ec3/7218d1a1a3301f1f?show_docid=7218d1a1a3301f1f</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/888f406027751ec3/7218d1a1a3301f1f?show_docid=7218d1a1a3301f1f"/>
  <title type="text">Re: Question on Triggers</title>
  <summary type="html" xml:space="preserve">
  Hi Russell, &lt;br&gt; Currently i do not have any examples or code as I am only at planning stage &lt;br&gt; and trying to find out if this is possible. &lt;br&gt; I will try and explain a bit more clearly &lt;br&gt; John can access DB1 and update his status in table 1. &lt;br&gt; I am trying to find out if i can create a trigger that fires when table 1 .
  </summary>
  </entry>
  <entry>
  <author>
  <name>Russell Fields</name>
  <email>russellfie...@nomail.com</email>
  </author>
  <updated>2009-11-26T19:37:20Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/ca658af9d0a9786a/1801688161b19ee3?show_docid=1801688161b19ee3</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/ca658af9d0a9786a/1801688161b19ee3?show_docid=1801688161b19ee3"/>
  <title type="text">Re: Country &gt; Region</title>
  <summary type="html" xml:space="preserve">
  Miguel, &lt;br&gt; It depends, of course. If your countries _always_ have regions, then you &lt;br&gt; can simply have your Centers refer to the Regions. &lt;br&gt; If, however, one of the Countries does not have Regions you will have to &lt;br&gt; either: &lt;br&gt; 1. Carry both CountryID and RegionID in the Centers &lt;br&gt; 2. Force an artificial Region for every Country.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Russell Fields</name>
  <email>russellfie...@nomail.com</email>
  </author>
  <updated>2009-11-26T19:33:56Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/888f406027751ec3/3365645665102b62?show_docid=3365645665102b62</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/888f406027751ec3/3365645665102b62?show_docid=3365645665102b62"/>
  <title type="text">Re: Question on Triggers</title>
  <summary type="html" xml:space="preserve">
  Peter, &lt;br&gt; I am sorry, but I do not fully understand what you are asking, but since it &lt;br&gt; is related to permissions you might find the following useful: &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://www.sommarskog.se/grantperm.html&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; This is about giving permissions to stored procedures, but I believe that it &lt;br&gt; explains things enough for you to leverage your problem.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Peter Newman</name>
  <email>peternew...@discussions.microsoft.com</email>
  </author>
  <updated>2009-11-26T19:09:01Z</updated>
  <id>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/888f406027751ec3/a3716d1f4ec5d0b6?show_docid=a3716d1f4ec5d0b6</id>
  <link href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/888f406027751ec3/a3716d1f4ec5d0b6?show_docid=a3716d1f4ec5d0b6"/>
  <title type="text">Question on Triggers</title>
  <summary type="html" xml:space="preserve">
  I’m running SQL2008. &lt;br&gt; I am trying to work out a soluition to a security problem. I have simplified &lt;br&gt; my query to find out if it is possible and a simple example &lt;br&gt; There are two databases ( DB1 and DB2 ) &lt;br&gt; DB1 has a table called TB1 and a field (Varchar) called ‘Status’ &lt;br&gt; DB2 has a table called TB2 and a stored procedure called SP1. SP1 accepts a
  </summary>
  </entry>
</feed>
