<?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 RE: Syntax for Dynamic SQL query with Excel in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Syntax-for-Dynamic-SQL-query-with-Excel/m-p/53294#M8011</link>
    <description>&lt;SPAN&gt;Hi Sapna,&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;You could try the below syntax:&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;&lt;BR /&gt;1. &lt;/STRONG&gt;"Select&amp;nbsp;[Loan Number],[Borrower Fullname] from ["&amp;amp;[Data1]&amp;amp;"$]"&lt;BR /&gt;If the Loan Number is of Text:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG&gt;2. &lt;/STRONG&gt;"Select&amp;nbsp;&lt;SPAN&gt;[Borrower Fullname] from [ACBS_SET_IDSA_CVS20200407$] where [Loan Number]='"&amp;amp;[Data1]&amp;amp;"'"&lt;BR /&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;/STRONG&gt;If the Loan Number is of number datatype&lt;BR /&gt;&lt;STRONG&gt;2. &lt;/STRONG&gt;"Select&amp;nbsp;&lt;SPAN&gt;[Borrower Fullname] from [ACBS_SET_IDSA_CVS20200407$] where [Loan Number]="&amp;amp;[Data1]&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt;&amp;nbsp;"Select distinct [Borrower Fullname] from [ACBS_SET_IDSA_CVS20200407$] where [Borrower Fullname] like '%"&amp;amp;[Data1]&amp;amp;"%'"&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Thank You and have a nice day&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Rajath Gopal&lt;BR /&gt;Associate IT Consultant&lt;BR /&gt;ITC Infotech&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;8904867411&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Wed, 06 May 2020 13:41:00 GMT</pubDate>
    <dc:creator>RajathGopal</dc:creator>
    <dc:date>2020-05-06T13:41:00Z</dc:date>
    <item>
      <title>Syntax for Dynamic SQL query with Excel</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Syntax-for-Dynamic-SQL-query-with-Excel/m-p/53293#M8010</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I am looking to syntax for&amp;nbsp; basic SQL queries for making it dynamic. I have my data in excel on which i am using oledb. please help me know how to convert the hard coded values into generic syntax on below queries -&lt;BR /&gt;&lt;BR /&gt;1.Select [Loan Number],[Borrower Fullname] from [ACBS_SET_IDSA_CVS20200407$]&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;In this query, ACBS_SET_IDSA_CVS20200407 is my sheet name. How to pass a data type if &amp;nbsp;this sheet name is &amp;nbsp;store in Data1&lt;BR /&gt;&lt;BR /&gt;2. Select [Borrower Fullname] from [ACBS_SET_IDSA_CVS20200407$] where [Loan Number]='123456'&lt;BR /&gt;&lt;BR /&gt;In this query, &amp;nbsp;I want to replace the loan no. 123456 with some data type– Data1, which will store dynamic values. How do we do that.&lt;BR /&gt;&lt;BR /&gt;3.Select distinct [Borrower Fullname] from [ACBS_SET_IDSA_CVS20200407$] where [Borrower Fullname] like '%WEST%'&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;I want to pass WEST into a data type. What will be the syntax.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;sapna soni&lt;BR /&gt;.&lt;BR /&gt;Capgemini Pvt Ltd&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 06 May 2020 12:47:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Syntax-for-Dynamic-SQL-query-with-Excel/m-p/53293#M8010</guid>
      <dc:creator>sapna_soni0290</dc:creator>
      <dc:date>2020-05-06T12:47:00Z</dc:date>
    </item>
    <item>
      <title>RE: Syntax for Dynamic SQL query with Excel</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Syntax-for-Dynamic-SQL-query-with-Excel/m-p/53294#M8011</link>
      <description>&lt;SPAN&gt;Hi Sapna,&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;You could try the below syntax:&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;&lt;BR /&gt;1. &lt;/STRONG&gt;"Select&amp;nbsp;[Loan Number],[Borrower Fullname] from ["&amp;amp;[Data1]&amp;amp;"$]"&lt;BR /&gt;If the Loan Number is of Text:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG&gt;2. &lt;/STRONG&gt;"Select&amp;nbsp;&lt;SPAN&gt;[Borrower Fullname] from [ACBS_SET_IDSA_CVS20200407$] where [Loan Number]='"&amp;amp;[Data1]&amp;amp;"'"&lt;BR /&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;/STRONG&gt;If the Loan Number is of number datatype&lt;BR /&gt;&lt;STRONG&gt;2. &lt;/STRONG&gt;"Select&amp;nbsp;&lt;SPAN&gt;[Borrower Fullname] from [ACBS_SET_IDSA_CVS20200407$] where [Loan Number]="&amp;amp;[Data1]&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt;&amp;nbsp;"Select distinct [Borrower Fullname] from [ACBS_SET_IDSA_CVS20200407$] where [Borrower Fullname] like '%"&amp;amp;[Data1]&amp;amp;"%'"&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Thank You and have a nice day&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Rajath Gopal&lt;BR /&gt;Associate IT Consultant&lt;BR /&gt;ITC Infotech&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;8904867411&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 06 May 2020 13:41:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Syntax-for-Dynamic-SQL-query-with-Excel/m-p/53294#M8011</guid>
      <dc:creator>RajathGopal</dc:creator>
      <dc:date>2020-05-06T13:41:00Z</dc:date>
    </item>
    <item>
      <title>RE: Syntax for Dynamic SQL query with Excel</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Syntax-for-Dynamic-SQL-query-with-Excel/m-p/53295#M8012</link>
      <description>Hi Rajath,&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;These queries are working fine when i am directly passing it to input parameter of get collection action of oledb object. But I need to store these queries into data item &amp;amp; then pass that data item to oledb page to make the component reusable.&lt;BR /&gt;&lt;BR /&gt;Is there any way to do so with these queires?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;sapna soni&lt;BR /&gt;.&lt;BR /&gt;Capgemini Pvt Ltd&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 06 May 2020 15:10:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Syntax-for-Dynamic-SQL-query-with-Excel/m-p/53295#M8012</guid>
      <dc:creator>sapna_soni0290</dc:creator>
      <dc:date>2020-05-06T15:10:00Z</dc:date>
    </item>
    <item>
      <title>RE: Syntax for Dynamic SQL query with Excel</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Syntax-for-Dynamic-SQL-query-with-Excel/m-p/53296#M8013</link>
      <description>Yep&amp;nbsp;it is possible, but you will have to work with a few data items as you are also getting dynamic values.&lt;BR /&gt;For instance for your first query:&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;1.&amp;nbsp;&lt;/STRONG&gt;"Select&amp;nbsp;[Loan Number],[Borrower Fullname] from ["&amp;amp;[Data1]&amp;amp;"$]"&lt;BR /&gt;&lt;BR /&gt;You will need 3 data items:&lt;BR /&gt;DataItem1:&amp;nbsp;Select&amp;nbsp;[Loan Number],[Borrower Fullname] from [&lt;BR /&gt;DataItem2: $]&lt;BR /&gt;This should be passed in you expression editor of get collection. So your expression for the query param would look something like below:&lt;BR /&gt;[DataItem1]&amp;amp;[Data1]&amp;amp;[DataItem2].&lt;BR /&gt;&lt;/SPAN&gt;So you could repeat the same for the other queries as well.&lt;BR /&gt;&lt;BR /&gt;Hope this helps!!&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Thank You and Have a Nice Day,&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Rajath Gopal&lt;BR /&gt;Associate IT Consultant&lt;BR /&gt;ITC Infotech&lt;BR /&gt;Asia/Kolkata&lt;BR /&gt;8904867411&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 06 May 2020 15:50:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Syntax-for-Dynamic-SQL-query-with-Excel/m-p/53296#M8013</guid>
      <dc:creator>RajathGopal</dc:creator>
      <dc:date>2020-05-06T15:50:00Z</dc:date>
    </item>
  </channel>
</rss>

