<?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/"
		>
<channel>
	<title>Comments on: Syntax Error in FROM Clause</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2006/01/06/syntax-error-in-from-clause/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2006/01/06/syntax-error-in-from-clause/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: mytechpeople</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/01/06/syntax-error-in-from-clause/#comment-32813</link>
		<dc:creator>mytechpeople</dc:creator>
		<pubDate>Wed, 11 Jun 2008 20:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1311#comment-32813</guid>
		<description>&lt;p&gt;I fixed this problem by taking spaces out of table names. Of course, after trying a dozen more complex solutions.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I fixed this problem by taking spaces out of table names. Of course, after trying a dozen more complex solutions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AnandaSim</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/01/06/syntax-error-in-from-clause/#comment-29842</link>
		<dc:creator>AnandaSim</dc:creator>
		<pubDate>Fri, 11 Jan 2008 03:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1311#comment-29842</guid>
		<description>&lt;p&gt;Welcome to the world of SQL and data access across heterogeneous databases and technologies. When you have multiple database engines and different connection mechanisms, you have this diversity that is outside of Excel - which is monolithic.&lt;br&gt;
DAO is the most intimate object model to Jet. And it has come back to be the recommended MS object model for Jet in Office 2007. ADO is better for heterogeneous work in say .asp web pages where you want one object model to connect to Access, SQL Server and Oracle without thinking twice. However. ADO is already old because ADO.NET is the object model for current .NET technology.&lt;br&gt;
There is a difference between raw data store and data format. This is more apparent in a database than a spreadsheet. Access stores a datetime field. There is no date only field like sql server. So regardless of what the format is, long date, short date, British style date or American style date, the data is stored as a number - the whole number is the days, the fraction is the time - this is in Excel and in Access. To have a pure date, the time portion is zero. SQL dates are in American style.&lt;br&gt;
Jet SQL deviates from ANSI SQL by incorporating VBA Functions - so you can carry out VBA function calculations within Jet SQL. Jet/VBA has a NOW() and a DATE() - NOW has a time component, DATE does not.&lt;br&gt;
ODBC and OLEDB are intermediate layers gluing the JET (now called ACE) engine to VBA. OLEDB is more efficient and more intimate. ODBC is more abstracted and Jet/ODBC is only a single tier driver unlike MySQL, Oracle, SQL server. Use OLEDB if you can.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Welcome to the world of SQL and data access across heterogeneous databases and technologies. When you have multiple database engines and different connection mechanisms, you have this diversity that is outside of Excel &#8211; which is monolithic.<br />
DAO is the most intimate object model to Jet. And it has come back to be the recommended MS object model for Jet in Office 2007. ADO is better for heterogeneous work in say .asp web pages where you want one object model to connect to Access, SQL Server and Oracle without thinking twice. However. ADO is already old because ADO.NET is the object model for current .NET technology.<br />
There is a difference between raw data store and data format. This is more apparent in a database than a spreadsheet. Access stores a datetime field. There is no date only field like sql server. So regardless of what the format is, long date, short date, British style date or American style date, the data is stored as a number &#8211; the whole number is the days, the fraction is the time &#8211; this is in Excel and in Access. To have a pure date, the time portion is zero. SQL dates are in American style.<br />
Jet SQL deviates from ANSI SQL by incorporating VBA Functions &#8211; so you can carry out VBA function calculations within Jet SQL. Jet/VBA has a NOW() and a DATE() &#8211; NOW has a time component, DATE does not.<br />
ODBC and OLEDB are intermediate layers gluing the JET (now called ACE) engine to VBA. OLEDB is more efficient and more intimate. ODBC is more abstracted and Jet/ODBC is only a single tier driver unlike MySQL, Oracle, SQL server. Use OLEDB if you can.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TR</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/01/06/syntax-error-in-from-clause/#comment-22547</link>
		<dc:creator>TR</dc:creator>
		<pubDate>Wed, 21 Feb 2007 03:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1311#comment-22547</guid>
		<description>&lt;p&gt;in the where clause there is a less than greater than sign (not equal to)!!!!!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>in the where clause there is a less than greater than sign (not equal to)!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TR</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/01/06/syntax-error-in-from-clause/#comment-22546</link>
		<dc:creator>TR</dc:creator>
		<pubDate>Wed, 21 Feb 2007 03:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1311#comment-22546</guid>
		<description>&lt;p&gt;Hope this will help:&lt;/p&gt;
&lt;p&gt;    Dim cn As ADODB.Connection&lt;br&gt;
    Dim rs As ADODB.Recordset&lt;/p&gt;
&lt;p&gt;    Set cn = New ADODB.Connection&lt;/p&gt;
&lt;p&gt;    cn.Open &quot;Provider=Microsoft.Jet.OLEDB.4.0;&quot; &amp; _&lt;br&gt;
        &quot;Data Source=&quot; &amp; &quot;C:Documents and SettingsAll UsersDesktopFILENAME.XLS&quot; &amp; &quot;;&quot; &amp; _&lt;br&gt;
        &quot;Extended Properties=Excel 8.0;&quot;&lt;/p&gt;
&lt;p&gt;     Set rs = New ADODB.Recordset&lt;br&gt;
     rs.CursorLocation = adUseClient&lt;/p&gt;
&lt;p&gt;     rs.Open &quot;SELECT * FROM [DATA$] Where xCURRENT  xNEW&quot;, cn&lt;/p&gt;
&lt;p&gt;     Debug.Print rs.RecordCount&lt;/p&gt;
&lt;p&gt;     Do Until rs.EOF&lt;br&gt;
        Debug.Print rs(&quot;ItemCode&quot;).Value + &quot; : &quot; &amp; CStr(rs(&quot;xNew&quot;).Value)&lt;br&gt;
        rs.MoveNext&lt;br&gt;
     Loop&lt;/p&gt;
&lt;p&gt;     rs.Close&lt;br&gt;
     Set rs = Nothing&lt;/p&gt;
&lt;p&gt;     cn.Close&lt;br&gt;
     Set cn = Nothing&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hope this will help:</p>
<p>    Dim cn As ADODB.Connection<br />
    Dim rs As ADODB.Recordset</p>
<p>    Set cn = New ADODB.Connection</p>
<p>    cn.Open &#8220;Provider=Microsoft.Jet.OLEDB.4.0;&#8221; &amp; _<br />
        &#8220;Data Source=&#8221; &amp; &#8220;C:Documents and SettingsAll UsersDesktopFILENAME.XLS&#8221; &amp; &#8220;;&#8221; &amp; _<br />
        &#8220;Extended Properties=Excel 8.0;&#8221;</p>
<p>     Set rs = New ADODB.Recordset<br />
     rs.CursorLocation = adUseClient</p>
<p>     rs.Open &#8220;SELECT * FROM [DATA$] Where xCURRENT  xNEW&#8221;, cn</p>
<p>     Debug.Print rs.RecordCount</p>
<p>     Do Until rs.EOF<br />
        Debug.Print rs(&#8220;ItemCode&#8221;).Value + &#8221; : &#8221; &amp; CStr(rs(&#8220;xNew&#8221;).Value)<br />
        rs.MoveNext<br />
     Loop</p>
<p>     rs.Close<br />
     Set rs = Nothing</p>
<p>     cn.Close<br />
     Set cn = Nothing</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mehboob Alam</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/01/06/syntax-error-in-from-clause/#comment-21224</link>
		<dc:creator>Mehboob Alam</dc:creator>
		<pubDate>Tue, 10 Oct 2006 23:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1311#comment-21224</guid>
		<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How to use where clause in sql in excel programming to retrive data &lt;/p&gt;
&lt;p&gt;like &quot;select* frim Sheet1 where column = &quot;alam&quot;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>How to use where clause in sql in excel programming to retrive data </p>
<p>like &#8220;select* frim Sheet1 where column = &#8220;alam&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mats</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/01/06/syntax-error-in-from-clause/#comment-19913</link>
		<dc:creator>Mats</dc:creator>
		<pubDate>Tue, 13 Jun 2006 08:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1311#comment-19913</guid>
		<description>&lt;p&gt;I had exactly the same problem when building a query in Excel from an Access file. The problem was a &quot;.&quot; in one of the foldernames. Moved the file, and everything work again.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I had exactly the same problem when building a query in Excel from an Access file. The problem was a &#8220;.&#8221; in one of the foldernames. Moved the file, and everything work again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/01/06/syntax-error-in-from-clause/#comment-19133</link>
		<dc:creator>Travis</dc:creator>
		<pubDate>Fri, 10 Mar 2006 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1311#comment-19133</guid>
		<description>&lt;p&gt;I ran into this problem while bulding a query in Excel from an Access file. I moved the Access file to another directory on my machine, and it fixed the problem. I am thinking there was an issue in the path to the file name that was conflicting with the SQL. Perhaps a period in one of the directory names or something.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I ran into this problem while bulding a query in Excel from an Access file. I moved the Access file to another directory on my machine, and it fixed the problem. I am thinking there was an issue in the path to the file name that was conflicting with the SQL. Perhaps a period in one of the directory names or something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/01/06/syntax-error-in-from-clause/#comment-18335</link>
		<dc:creator>Jan</dc:creator>
		<pubDate>Mon, 16 Jan 2006 14:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1311#comment-18335</guid>
		<description>&lt;p&gt;In defence of poor &quot;Old&quot; DAO.  It is also shorter and much cleaner to write than RDO or ADO.  The object structure is easy and if you know you only need to link to Access the benefits can be great.  &lt;/p&gt;
&lt;p&gt;The speed difference is negligable at best and I am quite happy to accept that ADO could out run DAO in the 100m Sprint, but the cost is unreadable code for the poor untrained sap who has to maintain the code you wrote.  Performance is rarely a significant issue when compared with ease of decoding and no one ever takes Access seriously enough to give it the resources and documentation of a real Big System.  Lets face it you didn&#039;t choose Access because of it&#039;s performance so why start to worry now.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>In defence of poor &#8220;Old&#8221; DAO.  It is also shorter and much cleaner to write than RDO or ADO.  The object structure is easy and if you know you only need to link to Access the benefits can be great.  </p>
<p>The speed difference is negligable at best and I am quite happy to accept that ADO could out run DAO in the 100m Sprint, but the cost is unreadable code for the poor untrained sap who has to maintain the code you wrote.  Performance is rarely a significant issue when compared with ease of decoding and no one ever takes Access seriously enough to give it the resources and documentation of a real Big System.  Lets face it you didn&#8217;t choose Access because of it&#8217;s performance so why start to worry now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Billkamm</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/01/06/syntax-error-in-from-clause/#comment-18138</link>
		<dc:creator>Billkamm</dc:creator>
		<pubDate>Tue, 10 Jan 2006 14:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1311#comment-18138</guid>
		<description>&lt;p&gt;I&#039;ve had this problem before when there is a field name by the same name as the table name or possibly a user-defined function with the same name as the table.&lt;/p&gt;
&lt;p&gt;This is not the case in your example, but you also should be aware of reserved words:&lt;br&gt;
&lt;a href=&quot;http://support.microsoft.com/kb/q209187/&quot; rel=&quot;nofollow&quot;&gt;http://support.microsoft.com/kb/q209187/&lt;/a&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve had this problem before when there is a field name by the same name as the table name or possibly a user-defined function with the same name as the table.</p>
<p>This is not the case in your example, but you also should be aware of reserved words:<br />
<a href="http://support.microsoft.com/kb/q209187/" rel="nofollow">http://support.microsoft.com/kb/q209187/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rembo</title>
		<link>http://www.dailydoseofexcel.com/archives/2006/01/06/syntax-error-in-from-clause/#comment-18117</link>
		<dc:creator>Rembo</dc:creator>
		<pubDate>Sun, 08 Jan 2006 01:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1311#comment-18117</guid>
		<description>&lt;p&gt;Dick,&lt;/p&gt;
&lt;p&gt;Alright, let&#039;s have the discussion now :-)&lt;br&gt;
I prefer using DAO for Access databases for the simple reason that it outperforms the more generic ADO method when accessing a mdb file. I wrote a post about ADO vs DAO that you can find here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.excelkb.com/instantforum41/Topic74-14-1.aspx#bm79&quot; rel=&quot;nofollow&quot;&gt;http://www.excelkb.com/instantforum41/Topic74-14-1.aspx#bm79&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Not to advertise but we had a related discussion on Colo&#039;s forum about ADO/DAO as well that you can find here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.puremis.net/excel/cgi-bin/yabb/YaBB.pl?num=1132620479/19#19&quot; rel=&quot;nofollow&quot;&gt;http://www.puremis.net/excel/cgi-bin/yabb/YaBB.pl?num=1132620479/19#19&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You don&#039;t use OLE DB with MSQuery, it&#039;s done from VBA. For a connection string see:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.codeproject.com/database/connectionstrings.asp#OLE%20DB%20Jet&quot; rel=&quot;nofollow&quot;&gt;http://www.codeproject.com/database/connectionstrings.asp#OLE%20DB%20Jet&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;General issue is that I wouldn&#039;t use ODBC if I don&#039;t have to simply because there are more efficient ways to retrieve data from an Access database (read: mdb file).&lt;/p&gt;
&lt;p&gt;When using OLEDB the Data Source Name is not relevant. DSN or DSN-less are terms that come along with ODBC.&lt;/p&gt;
&lt;p&gt;Remco&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick,</p>
<p>Alright, let&#8217;s have the discussion now <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> <br />
I prefer using DAO for Access databases for the simple reason that it outperforms the more generic ADO method when accessing a mdb file. I wrote a post about ADO vs DAO that you can find here:</p>
<p><a href="http://www.excelkb.com/instantforum41/Topic74-14-1.aspx#bm79" rel="nofollow">http://www.excelkb.com/instantforum41/Topic74-14-1.aspx#bm79</a></p>
<p>Not to advertise but we had a related discussion on Colo&#8217;s forum about ADO/DAO as well that you can find here:</p>
<p><a href="http://www.puremis.net/excel/cgi-bin/yabb/YaBB.pl?num=1132620479/19#19" rel="nofollow">http://www.puremis.net/excel/cgi-bin/yabb/YaBB.pl?num=1132620479/19#19</a></p>
<p>You don&#8217;t use OLE DB with MSQuery, it&#8217;s done from VBA. For a connection string see:</p>
<p><a href="http://www.codeproject.com/database/connectionstrings.asp#OLE%20DB%20Jet" rel="nofollow">http://www.codeproject.com/database/connectionstrings.asp#OLE%20DB%20Jet</a></p>
<p>General issue is that I wouldn&#8217;t use ODBC if I don&#8217;t have to simply because there are more efficient ways to retrieve data from an Access database (read: mdb file).</p>
<p>When using OLEDB the Data Source Name is not relevant. DSN or DSN-less are terms that come along with ODBC.</p>
<p>Remco</p>
]]></content:encoded>
	</item>
</channel>
</rss>

