<?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/"
	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>Basketman&#039;s Blog</title>
	<atom:link href="http://basketman.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://basketman.wordpress.com</link>
	<description>Blog ความรู้ด้าน IT และเรื่องอื่น ๆ ที่น่าสนใจ</description>
	<lastBuildDate>Fri, 06 May 2011 04:35:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='basketman.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/62e43bf0c251cc3d069c324164c92d8c?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Basketman&#039;s Blog</title>
		<link>http://basketman.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://basketman.wordpress.com/osd.xml" title="Basketman&#039;s Blog" />
	<atom:link rel='hub' href='http://basketman.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How to Crack, Unprotect or Remove Document Protection in Word</title>
		<link>http://basketman.wordpress.com/2011/05/06/how-to-crack-unprotect-or-remove-document-protection-in-word/</link>
		<comments>http://basketman.wordpress.com/2011/05/06/how-to-crack-unprotect-or-remove-document-protection-in-word/#comments</comments>
		<pubDate>Fri, 06 May 2011 04:35:45 +0000</pubDate>
		<dc:creator>Basketman</dc:creator>
				<category><![CDATA[MS Word]]></category>

		<guid isPermaLink="false">http://basketman.wordpress.com/?p=342</guid>
		<description><![CDATA[http://shaikhsohail.wordpress.com/2008/09/27/how-to-crack-unprotect-or-remove-document-protection-in-word/ Ever run into situation where someone sends you a read-only password protected Word document, but wants you to make changes? Here’s how to crack it if you are using the newer versions of Word: If you are using office XP or 2003, you can change the view to HTML-Code using Microsoft Script-Editor by pressing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basketman.wordpress.com&amp;blog=10114070&amp;post=342&amp;subd=basketman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://shaikhsohail.wordpress.com/2008/09/27/how-to-crack-unprotect-or-remove-document-protection-in-word/">http://shaikhsohail.wordpress.com/2008/09/27/how-to-crack-unprotect-or-remove-document-protection-in-word/</a></p>
<p>Ever run into situation where someone sends you a read-only password protected Word document, but wants you to make changes?<br />
Here’s how to crack it if you are using the newer versions of Word:</p>
<p>If you are using office XP or 2003, you can change the view to HTML-Code using Microsoft Script-Editor by pressing the [Alt]+[Shift]+[F11] key combination.</p>
<p><strong>Search for “Password” and you will find somethimg like this:<br />
</strong>&lt;w:DocumentProtection&gt;ReadOnly&lt;/w:DocumentProtection&gt;<br />
&lt;w:UnprotectPassword&gt;19E8E61E&lt;/w:UnprotectPassword&gt;</p>
<p><strong>To remove the protection:<br />
</strong>-Just remowe those two lines, and after saving the document , the protection is gone.</p>
<p><strong>To remove the password:<br />
</strong>-replace the Password, here “19E8E61E”, with “00000000″, save the Document and close “Script-Editor”.</p>
<p>Alternative you can save your document as .html and use a html-Editor</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basketman.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basketman.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basketman.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basketman.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basketman.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basketman.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basketman.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basketman.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basketman.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basketman.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basketman.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basketman.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basketman.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basketman.wordpress.com/342/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basketman.wordpress.com&amp;blog=10114070&amp;post=342&amp;subd=basketman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basketman.wordpress.com/2011/05/06/how-to-crack-unprotect-or-remove-document-protection-in-word/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80bdad1ff3c3720e0d36239066a02f34?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Basketman</media:title>
		</media:content>
	</item>
		<item>
		<title>เอา Google Map มาใส่ในเว็บ</title>
		<link>http://basketman.wordpress.com/2010/12/23/%e0%b9%80%e0%b8%ad%e0%b8%b2-google-map-%e0%b8%a1%e0%b8%b2%e0%b9%83%e0%b8%aa%e0%b9%88%e0%b9%83%e0%b8%99%e0%b9%80%e0%b8%a7%e0%b9%87%e0%b8%9a/</link>
		<comments>http://basketman.wordpress.com/2010/12/23/%e0%b9%80%e0%b8%ad%e0%b8%b2-google-map-%e0%b8%a1%e0%b8%b2%e0%b9%83%e0%b8%aa%e0%b9%88%e0%b9%83%e0%b8%99%e0%b9%80%e0%b8%a7%e0%b9%87%e0%b8%9a/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 02:01:57 +0000</pubDate>
		<dc:creator>Basketman</dc:creator>
				<category><![CDATA[Google Maps]]></category>

		<guid isPermaLink="false">http://basketman.wordpress.com/?p=337</guid>
		<description><![CDATA[ตัวอย่าง http://www.aurora.co.th/page_a.php?cid=35 http://wikimapia.org/#lat=14.0040744&#38;lon=100.5626249&#38;z=16&#38;l=0&#38;m=b<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basketman.wordpress.com&amp;blog=10114070&amp;post=337&amp;subd=basketman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>ตัวอย่าง</p>
<p><a href="http://www.aurora.co.th/page_a.php?cid=35">http://www.aurora.co.th/page_a.php?cid=35</a></p>
<p><a href="http://wikimapia.org/#lat=14.0040744&amp;lon=100.5626249&amp;z=16&amp;l=0&amp;m=b">http://wikimapia.org/#lat=14.0040744&amp;lon=100.5626249&amp;z=16&amp;l=0&amp;m=b</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basketman.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basketman.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basketman.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basketman.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basketman.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basketman.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basketman.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basketman.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basketman.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basketman.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basketman.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basketman.wordpress.com/337/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basketman.wordpress.com/337/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basketman.wordpress.com/337/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basketman.wordpress.com&amp;blog=10114070&amp;post=337&amp;subd=basketman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basketman.wordpress.com/2010/12/23/%e0%b9%80%e0%b8%ad%e0%b8%b2-google-map-%e0%b8%a1%e0%b8%b2%e0%b9%83%e0%b8%aa%e0%b9%88%e0%b9%83%e0%b8%99%e0%b9%80%e0%b8%a7%e0%b9%87%e0%b8%9a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80bdad1ff3c3720e0d36239066a02f34?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Basketman</media:title>
		</media:content>
	</item>
		<item>
		<title>Close All Windows Button</title>
		<link>http://basketman.wordpress.com/2010/11/15/close-all-windows-button/</link>
		<comments>http://basketman.wordpress.com/2010/11/15/close-all-windows-button/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 10:18:32 +0000</pubDate>
		<dc:creator>Basketman</dc:creator>
				<category><![CDATA[Utility]]></category>

		<guid isPermaLink="false">http://basketman.wordpress.com/?p=333</guid>
		<description><![CDATA[มาทำปุ่มปิดหน้าต่างทั้งหมดโดยการกดครั้งเดียวกันเถอะ http://www.ntwind.com/software/utilities/close-all.html<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basketman.wordpress.com&amp;blog=10114070&amp;post=333&amp;subd=basketman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>มาทำปุ่มปิดหน้าต่างทั้งหมดโดยการกดครั้งเดียวกันเถอะ</p>
<p><a href="http://www.ntwind.com/software/utilities/close-all.html">http://www.ntwind.com/software/utilities/close-all.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basketman.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basketman.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basketman.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basketman.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basketman.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basketman.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basketman.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basketman.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basketman.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basketman.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basketman.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basketman.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basketman.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basketman.wordpress.com/333/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basketman.wordpress.com&amp;blog=10114070&amp;post=333&amp;subd=basketman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basketman.wordpress.com/2010/11/15/close-all-windows-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80bdad1ff3c3720e0d36239066a02f34?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Basketman</media:title>
		</media:content>
	</item>
		<item>
		<title>หลากวิธีการ Export to excel</title>
		<link>http://basketman.wordpress.com/2010/09/14/%e0%b8%ab%e0%b8%a5%e0%b8%b2%e0%b8%81%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%81%e0%b8%b2%e0%b8%a3-export-to-excel/</link>
		<comments>http://basketman.wordpress.com/2010/09/14/%e0%b8%ab%e0%b8%a5%e0%b8%b2%e0%b8%81%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%81%e0%b8%b2%e0%b8%a3-export-to-excel/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 08:51:03 +0000</pubDate>
		<dc:creator>Basketman</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[GridView]]></category>
		<category><![CDATA[MS Excel]]></category>

		<guid isPermaLink="false">http://basketman.wordpress.com/?p=316</guid>
		<description><![CDATA[1. GridView to Excel ตัวอย่างนี้จะได้ Format ของ GridView มาด้วย ถ้ามีรูปอยู่ใน GridView ต้องเป็น Full URL Path ถึงจะ Export รูปออกมาได้ เช่น http://xxx.com/test/pic.png ถ้าเป็น /test/pic.png แบบนี้รูปจะไม่มาด้วย แบบนี้ format ทีเป็น style จะไม่มาด้วย 2. Copy / Paste วิธีนี้ใช้ได้โดยครอบส่วนที่ต้องการ Copy โดยใช้ Tag div แล้วให้ user กดที่ button Copy แล้วนำไป Paste ที่ Excel 3. Export to CSV โดยดึงข้อมูลจาก DataTable http://aspalliance.com/ http://www.aspsnippets.com/ มี [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basketman.wordpress.com&amp;blog=10114070&amp;post=316&amp;subd=basketman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#808000;"><strong>1. GridView to Excel</strong></span></p>
<p>ตัวอย่างนี้จะได้ Format ของ GridView มาด้วย ถ้ามีรูปอยู่ใน GridView ต้องเป็น Full URL Path ถึงจะ Export รูปออกมาได้ เช่น http://xxx.com/test/pic.png ถ้าเป็น /test/pic.png แบบนี้รูปจะไม่มาด้วย</p>
<p><pre class="brush: csharp;">
    protected void btnExport_Click(object sender, EventArgs e)
    {
        Response.Clear();
        Response.Buffer = true;
        Response.AddHeader(&quot;content-disposition&quot;, &quot;attachment;filename=GridViewExport.xls&quot;);
        Response.ContentType = &quot;application/vnd.ms-excel&quot;;
        StringWriter sw = new StringWriter();
        HtmlTextWriter hw = new HtmlTextWriter(sw);
        GridView1.RenderControl(hw);
        Response.Output.Write(sw.ToString());
        Response.Flush();
        Response.End();
    }
    public override void VerifyRenderingInServerForm(Control control)
    {
        /* Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. */
    }
</pre></p>
<p>แบบนี้ format ทีเป็น style จะไม่มาด้วย</p>
<p><pre class="brush: csharp;">
    protected void btnExport_Click(object sender, EventArgs e)
    {
        Response.ClearContent();
        Response.AddHeader(&quot;content-disposition&quot;, &quot;attachment;filename=&quot; + fileName);
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.ContentType = _contentType;
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        System.Web.UI.HtmlControls.HtmlForm frm = new System.Web.UI.HtmlControls.HtmlForm();
        frm.Attributes[&quot;runat&quot;] = &quot;server&quot;;
        frm.Controls.Add(GridView1);
        GridView1.RenderControl(htw);
        Response.Write(sw.ToString());
        Response.End();
    }
</pre></p>
<p><span style="color:#808000;"><strong>2. Copy / Paste</strong></span><br />
วิธีนี้ใช้ได้โดยครอบส่วนที่ต้องการ Copy โดยใช้ Tag div แล้วให้ user กดที่ button Copy แล้วนำไป Paste ที่ Excel</p>
<p><pre class="brush: xml;">
&lt;input type=&quot;button&quot; value=&quot;Copy&quot; onclick=&quot;window.clipboardData.setData('Text', document.all['MainDiv'].innerHTML)&quot; /&gt;
</pre></p>
<p><span style="color:#808000;"><strong>3. Export to CSV</strong></span><br />
โดยดึงข้อมูลจาก DataTable</p>
<p><pre class="brush: csharp;">
    protected void btnExport_Click(object sender, EventArgs e)
    {
        System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture(&quot;th-TH&quot;);
        DataTable dt = Session[&quot;ActualReceive&quot;] as DataTable;
        Response.ClearContent();
        Response.AddHeader(&quot;Content-Disposition&quot;, &quot;attachment;filename=ActualReceiveReport.csv&quot;);
        Response.ContentType = &quot;application/vnd.ms-excel&quot;;
        string tab = &quot;&quot;;
        foreach (DataColumn dc in dt.Columns)
        {
            Response.Write(tab + &quot;\&quot;&quot; + dc.ColumnName + &quot;\&quot;&quot;);
            tab = &quot;,&quot;;
        }
        Response.Write(&quot;\r\n&quot;);

        foreach (DataRow dr in dt.Rows)
        {
            tab = &quot;&quot;;
            int i;
            for (i = 0; i &lt; dt.Columns.Count; i++)
            {
                Response.Write(tab + &quot;\&quot;&quot; + dr[i].ToString().Replace(&quot;\&quot;&quot;,&quot;\&quot;\&quot;&quot;) + &quot;\&quot;&quot;);
                tab = &quot;,&quot;;
            }
            Response.Write(&quot;\r\n&quot;);
        }
        Response.End();
    }
</pre></p>
<p><a href="http://aspalliance.com/771">http://aspalliance.com/</a><br />
<a href="http://www.aspsnippets.com/Articles/Export-GridView-with-Images-to-Word-Excel-and-PDF-Formats-in-ASP.Net.aspx">http://www.aspsnippets.com/</a> มี export -&gt; word, pdf ด้วย<br />
<a href="http://mattberseth.com/blog/2007/04/export_gridview_to_excel_1.html">http://mattberseth.com/</a><br />
<a href="http://forums.asp.net/p/901776/986762.aspx">http://forums.asp.net/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basketman.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basketman.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basketman.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basketman.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basketman.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basketman.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basketman.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basketman.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basketman.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basketman.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basketman.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basketman.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basketman.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basketman.wordpress.com/316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basketman.wordpress.com&amp;blog=10114070&amp;post=316&amp;subd=basketman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basketman.wordpress.com/2010/09/14/%e0%b8%ab%e0%b8%a5%e0%b8%b2%e0%b8%81%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%81%e0%b8%b2%e0%b8%a3-export-to-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80bdad1ff3c3720e0d36239066a02f34?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Basketman</media:title>
		</media:content>
	</item>
		<item>
		<title>CAST incorrectly casting float to varchar</title>
		<link>http://basketman.wordpress.com/2010/09/13/cast-incorrectly-casting-float-to-varchar/</link>
		<comments>http://basketman.wordpress.com/2010/09/13/cast-incorrectly-casting-float-to-varchar/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 08:56:03 +0000</pubDate>
		<dc:creator>Basketman</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SQL Server 2008]]></category>

		<guid isPermaLink="false">http://basketman.wordpress.com/?p=318</guid>
		<description><![CDATA[เจอปัญหาการแปลง datatype จาก float ไปเป็น varchar ข้อมูลจะอยู่ในรูป 1.29913e+006 วิธีแก้ Wrap your float within the str() function which, when given only one parameter, does have the side effect of dropping off everything to the right of the decimal point. Problem: 1.23457e+009 Answer without decimal: 1234567890  Answer with decimal:   1234567890.01 ที่มา http://stackoverflow.com/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basketman.wordpress.com&amp;blog=10114070&amp;post=318&amp;subd=basketman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>เจอปัญหาการแปลง datatype จาก float ไปเป็น varchar ข้อมูลจะอยู่ในรูป 1.29913e+006</p>
<p>วิธีแก้</p>
<p>Wrap your float within the str() function which, when given only one  parameter, does have the side effect of dropping off everything to the right of  the decimal point.</p>
<p>Problem:<br />
<pre class="brush: sql;">select cast(cast(1234567890.01 as float) as varchar)</pre><br />
1.23457e+009</p>
<p>Answer without decimal:<br />
<pre class="brush: sql;">select str(cast(1234567890.01 as float))</pre><br />
1234567890 </p>
<p>Answer with decimal:<br />
<pre class="brush: sql;">select str(cast(1234567890.01 as float),13,2)</pre>  <br />
1234567890.01</p>
<p>ที่มา <a href="http://stackoverflow.com/questions/939703/cast-incorrectly-casting-float-to-varchar">http://stackoverflow.com/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basketman.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basketman.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basketman.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basketman.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basketman.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basketman.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basketman.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basketman.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basketman.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basketman.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basketman.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basketman.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basketman.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basketman.wordpress.com/318/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basketman.wordpress.com&amp;blog=10114070&amp;post=318&amp;subd=basketman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basketman.wordpress.com/2010/09/13/cast-incorrectly-casting-float-to-varchar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80bdad1ff3c3720e0d36239066a02f34?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Basketman</media:title>
		</media:content>
	</item>
	</channel>
</rss>
