<?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 How to create  SQL query from log? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-SQL-query-from-log/m-p/598312#M208343</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two files&amp;nbsp;Filed1 and&amp;nbsp;Filed2, Fileld1 is procedure call and Files 2 is the arguments&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i want to make a proper procedure call out of it by replacing "?"&amp;nbsp; with actual vales from the arguments&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Eg:&amp;nbsp;&lt;BR /&gt;Filed1&amp;nbsp; exec procedureABC arg1 = ?, arg2 = ?, arg3 = ?&lt;/P&gt;
&lt;P&gt;Filed2&amp;nbsp; arg1=EXEC, arg2=472.59, arg3=ABCI want to make a string like this&amp;nbsp; "exec proc1 arg1 = EXEC, arg2 = 472.59, arg3 = ABC"&lt;BR /&gt;How can i do this ?&lt;/P&gt;</description>
    <pubDate>Wed, 18 May 2022 16:43:23 GMT</pubDate>
    <dc:creator>jeesphilipz</dc:creator>
    <dc:date>2022-05-18T16:43:23Z</dc:date>
    <item>
      <title>How to create  SQL query from log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-SQL-query-from-log/m-p/598312#M208343</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two files&amp;nbsp;Filed1 and&amp;nbsp;Filed2, Fileld1 is procedure call and Files 2 is the arguments&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i want to make a proper procedure call out of it by replacing "?"&amp;nbsp; with actual vales from the arguments&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Eg:&amp;nbsp;&lt;BR /&gt;Filed1&amp;nbsp; exec procedureABC arg1 = ?, arg2 = ?, arg3 = ?&lt;/P&gt;
&lt;P&gt;Filed2&amp;nbsp; arg1=EXEC, arg2=472.59, arg3=ABCI want to make a string like this&amp;nbsp; "exec proc1 arg1 = EXEC, arg2 = 472.59, arg3 = ABC"&lt;BR /&gt;How can i do this ?&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 16:43:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-SQL-query-from-log/m-p/598312#M208343</guid>
      <dc:creator>jeesphilipz</dc:creator>
      <dc:date>2022-05-18T16:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create  SQL query from log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-SQL-query-from-log/m-p/598317#M208346</link>
      <description>&lt;P&gt;Assuming the fields are always in the format shown, you can extract the procedure from Field1 and append the contents of Field2 as the arguments.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=Field1 "(?&amp;lt;call&amp;gt;.*?) arg1"
| eval exec = call . " " . Field2&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 18 May 2022 14:20:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-SQL-query-from-log/m-p/598317#M208346</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-05-18T14:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create  SQL query from log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-SQL-query-from-log/m-p/598321#M208349</link>
      <description>&lt;P&gt;thanks for the reply&amp;nbsp;&lt;/P&gt;&lt;P&gt;That didn't&amp;nbsp; help me ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;procedure&lt;SPAN&gt;&amp;nbsp;call would be more complex and some times the argument list can have more element in it&amp;nbsp;&lt;BR /&gt;eg : exec procedureABC @arg1 = ?,&amp;nbsp; @arg2 = ?,&amp;nbsp; @arg3 = ?&amp;nbsp; in real scenario the procedure call parameter begin with '@'&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and the argument list wont have any '@' in it.&amp;nbsp; also argument list can have more than 10 elements so we need a lookup there&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 14:43:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-SQL-query-from-log/m-p/598321#M208349</guid>
      <dc:creator>jeesphilipz</dc:creator>
      <dc:date>2022-05-18T14:43:33Z</dc:date>
    </item>
  </channel>
</rss>

