<?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.co.uk/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-27T23:02:34Z</updated>
  <generator uri="http://groups.google.co.uk" version="1.99">Google Groups</generator>
  <entry>
  <author>
  <name>Erland Sommarskog</name>
  <email>esq...@sommarskog.se</email>
  </author>
  <updated>2009-11-27T23:02:34Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/5f8c4d68af3bbfed/8be38e72b2ffb24c?show_docid=8be38e72b2ffb24c</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/5f8c4d68af3bbfed/8be38e72b2ffb24c?show_docid=8be38e72b2ffb24c"/>
  <title type="text">Re: Interesting observation: new SQL time machine! :)</title>
  <summary type="html" xml:space="preserve">
  Actually, it might be more to it than just the difference in types. Some &lt;br&gt; time back I ran some performance tests, and my test procedures looked like &lt;br&gt; this: &lt;br&gt; DECLARE @start datetime2(3) &lt;br&gt; SELECT @start = sysdatetime() &lt;br&gt; &lt;p&gt; INSERT #Str_JOIN (wordno, guid) &lt;br&gt; SELECT u.wordno, u.guid &lt;br&gt; FROM usrdictwords u
  </summary>
  </entry>
  <entry>
  <author>
  <name>Jay</name>
  <email>s...@nospam.org</email>
  </author>
  <updated>2009-11-27T22:47:39Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/5f8c4d68af3bbfed/dbb4a31f74deff2e?show_docid=dbb4a31f74deff2e</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/5f8c4d68af3bbfed/dbb4a31f74deff2e?show_docid=dbb4a31f74deff2e"/>
  <title type="text">Re: Interesting observation: new SQL time machine! :)</title>
  <summary type="html" xml:space="preserve">
  Interesting. &lt;br&gt; Change the datetime2 to a precision of 3 and you can see why the 1st value &lt;br&gt; can be greater than the 2nd. &lt;br&gt; Definite rounding issue.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Erland Sommarskog</name>
  <email>esq...@sommarskog.se</email>
  </author>
  <updated>2009-11-27T22:48:29Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/14a6f300edd60844?show_docid=14a6f300edd60844</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/14a6f300edd60844?show_docid=14a6f300edd60844"/>
  <title type="text">Re: Why can&#39;t recursive queries contain...?</title>
  <summary type="html" xml:space="preserve">
  Rather than using an UDA, you can use FOR XML PATH for this. Here is &lt;br&gt; an example: &lt;br&gt; select CustomerID, &lt;br&gt; substring(OrdIdList, 1, datalength(OrdIdList)/2 - 1) &lt;br&gt; -- strip the last &#39;,&#39; from the list &lt;br&gt; from &lt;br&gt; Customers c cross apply &lt;br&gt; (select convert(nvarchar(30), OrderID) + &#39;,&#39; as [text()]
  </summary>
  </entry>
  <entry>
  <author>
  <name>Gert-Jan Strik</name>
  <email>sorrytoomuchspamalre...@xs4all.nl</email>
  </author>
  <updated>2009-11-27T22:45:34Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/5f8c4d68af3bbfed/f487989dbedda52a?show_docid=f487989dbedda52a</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/5f8c4d68af3bbfed/f487989dbedda52a?show_docid=f487989dbedda52a"/>
  <title type="text">Re: Interesting observation: new SQL time machine! :)</title>
  <summary type="html" xml:space="preserve">
  Thanks for the correction and explanation. &lt;br&gt; Your example shows that the GETDATE() function crosses boundaries only &lt;br&gt; after that specific time is reached. In other words, it will not return &lt;br&gt; &#39;14:00:25.923&#39; until it actually is 14:00:25.923000. &lt;br&gt; I find that peculiar. I would argue that it is not correct. If the
  </summary>
  </entry>
  <entry>
  <author>
  <name>Erland Sommarskog</name>
  <email>esq...@sommarskog.se</email>
  </author>
  <updated>2009-11-27T22:33:37Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/49046188c32d950a/c39065b8753b9aca?show_docid=c39065b8753b9aca</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/49046188c32d950a/c39065b8753b9aca?show_docid=c39065b8753b9aca"/>
  <title type="text">Re: Interview question...</title>
  <summary type="html" xml:space="preserve">
  I think the important part is that the candidate understands the context. &lt;br&gt; If he understands that he may be supposed to ask, it is likely that he &lt;br&gt; will. But if he thinks that the questions are meant to have one correct &lt;br&gt; answer, he would also believe that asking questions may lower his ranking. &lt;br&gt; And, mind you, not all people asking questions, know what they are asking
  </summary>
  </entry>
  <entry>
  <author>
  <name>Tom Cooper</name>
  <email>tomcoo...@comcast.net</email>
  </author>
  <updated>2009-11-27T21:41:48Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/a3cd1a9e8c17fdce/f7ea8b9867f899f1?show_docid=f7ea8b9867f899f1</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/a3cd1a9e8c17fdce/f7ea8b9867f899f1?show_docid=f7ea8b9867f899f1"/>
  <title type="text">Re: Weekdays</title>
  <summary type="html" xml:space="preserve">
  I&#39;m not sure what the tutorial was trying to demonstrate. But, yes, IMO &lt;br&gt; that would be a very bad way to get that result set in a production &lt;br&gt; environment. Very Inefficient. &lt;br&gt; Tom
  </summary>
  </entry>
  <entry>
  <author>
  <name>Michael Coles</name>
  <email>ad...@geocodenet.com</email>
  </author>
  <updated>2009-11-27T21:36:26Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/a3cd1a9e8c17fdce/7195f4948a18fcd0?show_docid=7195f4948a18fcd0</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/a3cd1a9e8c17fdce/7195f4948a18fcd0?show_docid=7195f4948a18fcd0"/>
  <title type="text">Re: Weekdays</title>
  <summary type="html" xml:space="preserve">
  As a demo it does illustrate the use of DATEFIRST, DATEPART, and DATENAME. &lt;br&gt; That said, I wouldn&#39;t put this in production code. You&#39;re performing a &lt;br&gt; DISTINCT query against the Sales.SalesOrderHeader, which may contain many &lt;br&gt; millions of rows which would make this query inefficient. Additionally &lt;br&gt; Sales.SalesOrderHeader could contain less than 7 rows, in which case you&#39;ll
  </summary>
  </entry>
  <entry>
  <author>
  <name>Jay</name>
  <email>s...@nospam.org</email>
  </author>
  <updated>2009-11-27T21:12:10Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/a3cd1a9e8c17fdce/bd076d04b8feb7e5?show_docid=bd076d04b8feb7e5</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/a3cd1a9e8c17fdce/bd076d04b8feb7e5?show_docid=bd076d04b8feb7e5"/>
  <title type="text">Weekdays</title>
  <summary type="html" xml:space="preserve">
  I&#39;m going through a tutorial and found they are using the following code: &lt;br&gt; SET DATEFIRST 1; &lt;br&gt; SELECT DISTINCT &lt;br&gt; DATEPART(weekday, S.OrderDate) as WeekDayNumber, &lt;br&gt; DATENAME(weekday, S.OrderDate) as Weekday &lt;br&gt; FROM Sales.SalesOrderHeader S &lt;br&gt; Order by WeekDayNumber &lt;br&gt; It returns: &lt;br&gt; 1 Monday &lt;br&gt; 2 Tuesday
  </summary>
  </entry>
  <entry>
  <author>
  <name>Michael Coles</name>
  <email>ad...@geocodenet.com</email>
  </author>
  <updated>2009-11-27T20:58:08Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/84e60726ab1b6a43?show_docid=84e60726ab1b6a43</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/84e60726ab1b6a43?show_docid=84e60726ab1b6a43"/>
  <title type="text">Re: Why can&#39;t recursive queries contain...?</title>
  <summary type="html" xml:space="preserve">
  There you go Michael C, Jeffrey has your OODBMS that surfaces procedural &lt;br&gt; C#/.NET/LINQ as its native language, handles hierarchical data with the &lt;br&gt; greatest of ease, efficiently returns objects to the client without having &lt;br&gt; to deal with all those &amp;quot;squares&amp;quot;, and automatically optimizes queries &lt;br&gt; without requiring you to define &amp;quot;indexes&amp;quot; or performing other administrative
  </summary>
  </entry>
  <entry>
  <author>
  <name>Sam</name>
  <email>s...@discussions.microsoft.com</email>
  </author>
  <updated>2009-11-27T20:43:02Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/7f3a44cab793cb07/01f0d6a744a04588?show_docid=01f0d6a744a04588</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/7f3a44cab793cb07/01f0d6a744a04588?show_docid=01f0d6a744a04588"/>
  <title type="text">Re: How costly is it to use BCP or OPENROWSET to create Excel file</title>
  <summary type="html" xml:space="preserve">
  Thank you both very much for your help. Been very helpful.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Jeffrey Williams</name>
  <email>jeff.williams3...@verizon.net</email>
  </author>
  <updated>2009-11-27T20:26:24Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/3d27b6e414e52632?show_docid=3d27b6e414e52632</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/3d27b6e414e52632?show_docid=3d27b6e414e52632"/>
  <title type="text">Re: Why can&#39;t recursive queries contain...?</title>
  <summary type="html" xml:space="preserve">
  As I replied on another branch - I actually think his dream already exists. &lt;br&gt; I know that everything he is asking for is already available from &lt;br&gt; Intersystems Cache.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Jeffrey Williams</name>
  <email>jeff.williams3...@verizon.net</email>
  </author>
  <updated>2009-11-27T20:24:33Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/6dcb1c08d24794a9?show_docid=6dcb1c08d24794a9</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/6dcb1c08d24794a9?show_docid=6dcb1c08d24794a9"/>
  <title type="text">Re: Why can&#39;t recursive queries contain...?</title>
  <summary type="html" xml:space="preserve">
  If you really think you want an OODBMS or Hierarchical DBMS which also has &lt;br&gt; capabilities to utilize SQL you might want to take a look at Intersystems &lt;br&gt; Cache. It does all of the above and is an Enterprise class system that can &lt;br&gt; also run on various hardware platforms. &lt;br&gt; You have the options of accessing data as objects, or running queries using
  </summary>
  </entry>
  <entry>
  <author>
  <name>Michael Coles</name>
  <email>ad...@geocodenet.com</email>
  </author>
  <updated>2009-11-27T19:39:59Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/7f3a44cab793cb07/527bada9b8f40652?show_docid=527bada9b8f40652</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/7f3a44cab793cb07/527bada9b8f40652?show_docid=527bada9b8f40652"/>
  <title type="text">Re: How costly is it to use BCP or OPENROWSET to create Excel files?</title>
  <summary type="html" xml:space="preserve">
  Agree with John, you probably want to use SSIS to export data directly to &lt;br&gt; Excel. As part of your SSIS package you can move the XLS file over to &lt;br&gt; another directory/server after the export.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Michael Coles</name>
  <email>ad...@geocodenet.com</email>
  </author>
  <updated>2009-11-27T19:27:18Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/f80614782a58e42b?show_docid=f80614782a58e42b</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/0fabc31ab3c8df84/f80614782a58e42b?show_docid=f80614782a58e42b"/>
  <title type="text">Re: Why can&#39;t recursive queries contain...?</title>
  <summary type="html" xml:space="preserve">
  Absolutely, and so do hierarchical DBMS&#39;s, which would solve his issues with &lt;br&gt; the limitations on hierarchical data inherent in the relational/SQL model. &lt;br&gt; I don&#39;t know why OODBMS&#39;s haven&#39;t caught on outside of specialized &lt;br&gt; applications either -- maybe they&#39;re inferior in some respects, could be an &lt;br&gt; issue of support, or it might just be good old-fashioned marketing? Either
  </summary>
  </entry>
  <entry>
  <author>
  <name>AG</name>
  <email>nospamagi...@newsgroup.nospam</email>
  </author>
  <updated>2009-11-27T19:21:25Z</updated>
  <id>http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/a5ddc75da91b6633/c24101c8b0cdfb2f?show_docid=c24101c8b0cdfb2f</id>
  <link href="http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/a5ddc75da91b6633/c24101c8b0cdfb2f?show_docid=c24101c8b0cdfb2f"/>
  <title type="text">Re: IDENTITY_INSERT</title>
  <summary type="html" xml:space="preserve">
  Thanks Tom. A big help as usual!
  </summary>
  </entry>
</feed>
