<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss version="2.0">
  <channel>
  <title>microsoft.public.sqlserver.programming Google Group</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming</link>
  <description>Microsoft SQL Server newsgroup.</description>
  <language>en</language>
  <item>
  <title>Re: How to join two variables in email body to send out?</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/0f66843e0f3fca38?show_docid=0f66843e0f3fca38</link>
  <description>
  Thanks Kalen, &lt;br&gt; So far there is no cases that exceed 8000 yet, I am just preparing for worst &lt;br&gt; case scenerio. I will keep my fingers crossed that it will not exceed 8000... &lt;br&gt; until we upgrade our server to SQL 2005 ;-) &lt;br&gt; But I faced another challenge which I posted in a separate thread &amp;quot;Why Email &lt;br&gt; body get truncated?&amp;quot;
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/0f66843e0f3fca38?show_docid=0f66843e0f3fca38</guid>
  <author>
  ju...@discussions.microsoft.com
  (Julie)
  </author>
  <pubDate>Wed, 02 Dec 2009 08:00:01 UT
</pubDate>
  </item>
  <item>
  <title>Why Email body get truncated?</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/b9b0e8c35eaebe0a/17b6c7f8188df037?show_docid=17b6c7f8188df037</link>
  <description>
  Good day everybody. &lt;br&gt; I am using SQL 2000 and is writing a Transact SQL to autosend an email after &lt;br&gt; a process. Here is an extract of my query : &lt;br&gt; DECLARE @EBody VARCHAR(8000) &lt;br&gt; .... process to build up @EBody content .... &lt;br&gt; exec master..usp_send_cdosysmail &lt;br&gt; @from =&#39;**Removed**&#39;, &lt;br&gt; @to = &#39;**Removed**&#39;, &lt;br&gt; @cc =&#39;**Removed**&#39;,
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/b9b0e8c35eaebe0a/17b6c7f8188df037?show_docid=17b6c7f8188df037</guid>
  <author>
  ju...@discussions.microsoft.com
  (Julie)
  </author>
  <pubDate>Wed, 02 Dec 2009 07:51:01 UT
</pubDate>
  </item>
  <item>
  <title>Re: How to join two variables in email body to send out?</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/6f37f9302aaa175a?show_docid=6f37f9302aaa175a</link>
  <description>
  There is a datatype called text in SQL 2000, but it is much more problematic &lt;br&gt; to work with. I suggest you re-evaluate and see if you can limit your total &lt;br&gt; characters to 8000 if at all possible.
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/6f37f9302aaa175a?show_docid=6f37f9302aaa175a</guid>
  <author>
  please_reply_on_newsgro...@domain.com
  (Kalen Delaney)
  </author>
  <pubDate>Wed, 02 Dec 2009 07:45:21 UT
</pubDate>
  </item>
  <item>
  <title>Re: How to join two variables in email body to send out?</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/71afabaea970405d?show_docid=71afabaea970405d</link>
  <description>
  VARCHAR(MAX) was added in SQL 2005, so this makes me suspect you might not &lt;br&gt; be running SQL 2005. &lt;br&gt; What do you get from this query: &lt;br&gt; SELECT @@version &lt;br&gt; If you are running SQL 2005, you&#39;ll need to show the whole batch as you &lt;br&gt; submitted it so we can see if the error is due to something else in your &lt;br&gt; code.
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/71afabaea970405d?show_docid=71afabaea970405d</guid>
  <author>
  please_reply_on_newsgro...@domain.com
  (Kalen Delaney)
  </author>
  <pubDate>Wed, 02 Dec 2009 07:42:14 UT
</pubDate>
  </item>
  <item>
  <title>Re: Merging two select cases</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/f504f293b29aa8de/55440eb65fe6beec?show_docid=55440eb65fe6beec</link>
  <description>
  I&#39;m not sure I understand what you want. But perhaps &lt;br&gt; With cte As &lt;br&gt; (Select ID,PR_ID,USER_ID,Job_Type_ID,M edium_ID, &lt;br&gt; Row_Number() Over (Partition By Job_Type_ID, Medium_ID Order By Case When &lt;br&gt; User_ID is Not Null Then 1 Else 2 End) As rn &lt;br&gt; From #A) &lt;br&gt; Select ID, PR_ID, USER_ID, Job_Type_ID, Medium_ID &lt;br&gt; From cte
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/f504f293b29aa8de/55440eb65fe6beec?show_docid=55440eb65fe6beec</guid>
  <author>
  tomcoo...@comcast.net
  (Tom Cooper)
  </author>
  <pubDate>Wed, 02 Dec 2009 07:38:33 UT
</pubDate>
  </item>
  <item>
  <title>Re: How to join two variables in email body to send out?</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/dc7b2246fb450430?show_docid=dc7b2246fb450430</link>
  <description>
  Kalen, &lt;br&gt; A thousand apologies. &lt;br&gt; I realised my mistake, my server is &amp;quot;Microsoft SQL Server 2000 - 8.00.2055 &lt;br&gt; (Intel X86)&amp;quot; &lt;br&gt; As newbie, I confuse it with the SQL version in my local PC. Yes, I test &lt;br&gt; Varchar(max) in my local PC and there is no error. &lt;br&gt; To solve the situation in my server, how should I go-about to solve it?
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/dc7b2246fb450430?show_docid=dc7b2246fb450430</guid>
  <author>
  ju...@discussions.microsoft.com
  (Julie)
  </author>
  <pubDate>Wed, 02 Dec 2009 07:36:01 UT
</pubDate>
  </item>
  <item>
  <title>Re: How to join two variables in email body to send out?</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/7ad578130ceb9f45?show_docid=7ad578130ceb9f45</link>
  <description>
  Hi Kalen, &lt;br&gt; Following your advise, I modified my query &lt;br&gt; DECLARE @EBody1 VARCHAR(MAX) &lt;br&gt; When I parse query, I get error message &amp;quot;Incorrect syntax near &#39;MAX&#39;.&amp;quot; at &lt;br&gt; that line. &lt;br&gt; The reason I do not wish to create table for this case because I extract &lt;br&gt; some data that I wish to highlight to my enduser via email. So is no need to
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/7ad578130ceb9f45?show_docid=7ad578130ceb9f45</guid>
  <author>
  ju...@discussions.microsoft.com
  (Julie)
  </author>
  <pubDate>Wed, 02 Dec 2009 07:26:01 UT
</pubDate>
  </item>
  <item>
  <title>Re: How to join two variables in email body to send out?</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/ad52ad3a79a4dd2d?show_docid=ad52ad3a79a4dd2d</link>
  <description>
  Julie &lt;br&gt; Please read my original response again. I suggested you might need to use &lt;br&gt; varchar(MAX) to hold more than 8000 characters. This is a new feature as of &lt;br&gt; SQL Server 2005. Please read about it in the Books Online before you use it. &lt;br&gt; I am concerned by your statement that you want to avoid creating a table, as
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/ad52ad3a79a4dd2d?show_docid=ad52ad3a79a4dd2d</guid>
  <author>
  please_reply_on_newsgro...@domain.com
  (Kalen Delaney)
  </author>
  <pubDate>Wed, 02 Dec 2009 07:08:18 UT
</pubDate>
  </item>
  <item>
  <title>Re: Merging two select cases</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/f504f293b29aa8de/3877caea37aeb461?show_docid=3877caea37aeb461</link>
  <description>
  Thanks for the response. Here is another version of the dataset I&#39;m working &lt;br&gt; with: &lt;br&gt; DROP TABLE #A; DROP TABLE #C; &lt;br&gt; CREATE TABLE #A (ID int, PR_ID int null, [User_ID] int null, Job_Type_ID int &lt;br&gt; null, Medium_ID int null) &lt;br&gt; INSERT INTO #A (ID, PR_ID, [USER_ID], Job_Type_ID, Medium_ID) VALUES &lt;br&gt; (99,	NULL,	904551,	30,	1)
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/f504f293b29aa8de/3877caea37aeb461?show_docid=3877caea37aeb461</guid>
  <author>
  mpa...@community.nospam
  (mpaine)
  </author>
  <pubDate>Wed, 02 Dec 2009 06:48:04 UT
</pubDate>
  </item>
  <item>
  <title>Re: How to join two variables in email body to send out?</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/7e7cc646e7b17cea?show_docid=7e7cc646e7b17cea</link>
  <description>
  Dear Kalen, &lt;br&gt; Thank you for your response. Yes, you are right, I should say concatenate &lt;br&gt; instead of join. I am a newbie in SQL programming. &lt;br&gt; Yes, VARCHAR is a better option then CHAR. &lt;br&gt; I avoid to create table or file therefore I need to store the data into &lt;br&gt; variable. As I understand the maximum for any datatype is 8000 only. So I
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/7e7cc646e7b17cea?show_docid=7e7cc646e7b17cea</guid>
  <author>
  ju...@discussions.microsoft.com
  (Julie)
  </author>
  <pubDate>Wed, 02 Dec 2009 05:31:01 UT
</pubDate>
  </item>
  <item>
  <title>Re: How to join two variables in email body to send out?</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/05ed36ff8942c42f?show_docid=05ed36ff8942c42f</link>
  <description>
  Hi again Julie &lt;br&gt; Also, you should be careful with your terminology. JOIN has a very &lt;br&gt; particular meaning when working with the SQL language. I believe (and &lt;br&gt; indicated in my previous response to you) that you are talking about &lt;br&gt; concatenation, not joining.
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/05ed36ff8942c42f?show_docid=05ed36ff8942c42f</guid>
  <author>
  please_reply_on_newsgro...@domain.com
  (Kalen Delaney)
  </author>
  <pubDate>Wed, 02 Dec 2009 04:48:38 UT
</pubDate>
  </item>
  <item>
  <title>Re: How to join two variables in email body to send out?</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/d6262046cd1f475e?show_docid=d6262046cd1f475e</link>
  <description>
  Hi Julie &lt;br&gt; A parameter passed into a stored procedure cannot be an expression... it can &lt;br&gt; only be a constant or a variable. You can declare another local variable &lt;br&gt; and assign the concatenation of @EBody1 and @Ebody2 to it, and the use the &lt;br&gt; new variable as the parameter. &lt;br&gt; I would also suggest you carefully consider whether you really want @Ebody1
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/7063f74558b60b7a/d6262046cd1f475e?show_docid=d6262046cd1f475e</guid>
  <author>
  please_reply_on_newsgro...@domain.com
  (Kalen Delaney)
  </author>
  <pubDate>Wed, 02 Dec 2009 04:47:03 UT
</pubDate>
  </item>
  <item>
  <title>Re: Sill confused with EXECUTE AS OWNER</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/1e172635d883269b/b94ca5ada4e38cb9?show_docid=b94ca5ada4e38cb9</link>
  <description>
  An impersonated context doesn&#39;t work cross-database by default. Reference &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://blogs.msdn.com/lcris/archive/2006/10/24/sql-server-2005-demo-for-enabling-database-impersonation-for-cross-database-access.aspx&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; and &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://blogs.msdn.com/raulga/archive/2006/10/30/using-a-digital-signature-as-a-secondary-identity-to-replace-cross-database-ownership-chaining.aspx&quot;&gt;[link]&lt;/a&gt;
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/1e172635d883269b/b94ca5ada4e38cb9?show_docid=b94ca5ada4e38cb9</guid>
  <author>
  no_bobb_s...@sqlskills.com
  (Bob Beauchemin)
  </author>
  <pubDate>Wed, 02 Dec 2009 04:44:08 UT
</pubDate>
  </item>
  <item>
  <title>Re: TSQL Challenge 18 - Generate text formatted month calendars</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/da9e12939a166e52/30c70d2eb4136e52?show_docid=30c70d2eb4136e52</link>
  <description>
  Plamen does indeed know how to craft a fine query!!
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/da9e12939a166e52/30c70d2eb4136e52?show_docid=30c70d2eb4136e52</guid>
  <author>
  kgbo...@earthlink.net
  (TheSQLGuru)
  </author>
  <pubDate>Wed, 02 Dec 2009 04:45:49 UT
</pubDate>
  </item>
  <item>
  <title>Re: Why can&#39;t recursive queries contain...?</title>
  <link>http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/0fabc31ab3c8df84/c820ab85a9559257?show_docid=c820ab85a9559257</link>
  <description>
  Sounds fine to me. &lt;br&gt; Sounds reasonable. In the *extremely* rare case I need to store such huge &lt;br&gt; strings then I expect to send the results to disk. If this is the reason &lt;br&gt; sqlserver has these 8k limits then that seams even sillier than I first &lt;br&gt; thought. A feature than it is very rarely used seams to be limiting the
  </description>
  <guid isPermaLink="true">http://groups.google.com.au/group/microsoft.public.sqlserver.programming/browse_frm/thread/0fabc31ab3c8df84/c820ab85a9559257?show_docid=c820ab85a9559257</guid>
  <author>
  m...@nospam.com
  (Michael C)
  </author>
  <pubDate>Wed, 02 Dec 2009 04:35:28 UT
</pubDate>
  </item>
  </channel>
</rss>
