<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Looking for help on writing a SQL query for OLEDB in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Looking-for-help-on-writing-a-SQL-query-for-OLEDB/m-p/85471#M36460</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Currently i am using OLEDB database to open an excel with name "excel" and&amp;nbsp; "2 columns" as , start date and&amp;nbsp; end date , currently iam using the below SQL query to extract the values of the rows with todays date as below&lt;BR /&gt;"SELECT * FROM [Excel$] WHERE [Start date] Like '%" &amp;amp; [Today] &amp;amp; "%'"&lt;BR /&gt;&lt;BR /&gt;please can some one help me to get the SQL query for extracting the rows with dates between the start date and end date&lt;BR /&gt;&lt;BR /&gt;Thankyou,&lt;BR /&gt;Miya&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Miya&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Sun, 27 Feb 2022 05:02:00 GMT</pubDate>
    <dc:creator>Miya</dc:creator>
    <dc:date>2022-02-27T05:02:00Z</dc:date>
    <item>
      <title>Looking for help on writing a SQL query for OLEDB</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Looking-for-help-on-writing-a-SQL-query-for-OLEDB/m-p/85471#M36460</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Currently i am using OLEDB database to open an excel with name "excel" and&amp;nbsp; "2 columns" as , start date and&amp;nbsp; end date , currently iam using the below SQL query to extract the values of the rows with todays date as below&lt;BR /&gt;"SELECT * FROM [Excel$] WHERE [Start date] Like '%" &amp;amp; [Today] &amp;amp; "%'"&lt;BR /&gt;&lt;BR /&gt;please can some one help me to get the SQL query for extracting the rows with dates between the start date and end date&lt;BR /&gt;&lt;BR /&gt;Thankyou,&lt;BR /&gt;Miya&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Miya&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Sun, 27 Feb 2022 05:02:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Looking-for-help-on-writing-a-SQL-query-for-OLEDB/m-p/85471#M36460</guid>
      <dc:creator>Miya</dc:creator>
      <dc:date>2022-02-27T05:02:00Z</dc:date>
    </item>
    <item>
      <title>RE: Looking for help on writing a SQL query for OLEDB</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Looking-for-help-on-writing-a-SQL-query-for-OLEDB/m-p/85472#M36461</link>
      <description>Hi &lt;A class="user-content-mention" data-sign="@" data-contactkey="f639aa5c-19c0-47ef-b9bb-8a6006eb5137" data-tag-text="@Miya" href="https://community.blueprism.com/network/profile?UserKey=f639aa5c-19c0-47ef-b9bb-8a6006eb5137" data-itemmentionkey="a6161295-5e3d-41ce-aa73-daca652c367c"&gt;@Miya&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;In this case, you want to filter dates, so need to use any of this operators: &amp;gt;, &amp;lt;, =, &amp;gt;=, &amp;lt;= or &amp;lt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;LIKE operator is used when you have text&lt;BR /&gt;&lt;BR /&gt;So, you correct syntax looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;SELECT * FROM [Excel$] WHERE [Start date] = DATE()&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;You can use the internal function of OLEDB SQL "DATE()" to get the current date. (Its the same as giving a Data Item value with Today())&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps you, and if this solves the problem, remember mark as best message&lt;BR /&gt;&lt;BR /&gt;See you in the community, bye &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Pablo Sarabia&lt;BR /&gt;Architect&lt;BR /&gt;Altamira Assets Management&lt;BR /&gt;Madrid&lt;BR /&gt;634726270&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Sun, 27 Feb 2022 08:08:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Looking-for-help-on-writing-a-SQL-query-for-OLEDB/m-p/85472#M36461</guid>
      <dc:creator>PabloSarabia</dc:creator>
      <dc:date>2022-02-27T08:08:00Z</dc:date>
    </item>
    <item>
      <title>RE: Looking for help on writing a SQL query for OLEDB</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Looking-for-help-on-writing-a-SQL-query-for-OLEDB/m-p/85473#M36462</link>
      <description>Hi Pableo.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; Thank you, actually iam looking for query where i need to filter the values between 2 columns when the column values fall in todays date. For eg column1 date is 28 feb 2022, column 2 date is 3rd march this particular row should get selected.&lt;BR /&gt;&lt;BR /&gt;Miya&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Miya&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Mar 2022 03:33:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Looking-for-help-on-writing-a-SQL-query-for-OLEDB/m-p/85473#M36462</guid>
      <dc:creator>Miya</dc:creator>
      <dc:date>2022-03-02T03:33:00Z</dc:date>
    </item>
    <item>
      <title>RE: Looking for help on writing a SQL query for OLEDB</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Looking-for-help-on-writing-a-SQL-query-for-OLEDB/m-p/85474#M36463</link>
      <description>Hi M,&lt;BR /&gt;&lt;BR /&gt;If I understand your requirements correctly, you have to check both columns for your date. &lt;BR /&gt;Something in style with:&lt;BR /&gt;&lt;STRONG&gt;SELECT * FROM [Excel$] WHERE ([Start date] &amp;lt;= DATE() AND [End date] &amp;gt;= DATE())&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;If I'm totally off here, then I do not understand what you are trying to select...&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Happy coding!&lt;BR /&gt;Paul&lt;BR /&gt;Sweden&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Mar 2022 08:49:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Looking-for-help-on-writing-a-SQL-query-for-OLEDB/m-p/85474#M36463</guid>
      <dc:creator>PvD_SE</dc:creator>
      <dc:date>2022-03-02T08:49:00Z</dc:date>
    </item>
  </channel>
</rss>

