<?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: Can you help me with my wildcard search involving two columns? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454269#M128534</link>
    <description>&lt;P&gt;Good approach but query which you provided didn't work in 7.1.2, however below one is working&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Report_Table.csv
| eval Target="*" + Target + "*"
| map search="|inputlookup Ticket_table.csv | search Notes=$Target$"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 29 Oct 2018 12:36:53 GMT</pubDate>
    <dc:creator>harsmarvania57</dc:creator>
    <dc:date>2018-10-29T12:36:53Z</dc:date>
    <item>
      <title>Can you help me with my wildcard search involving two columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454264#M128529</link>
      <description>&lt;P&gt;In my &lt;STRONG&gt;Report Table&lt;/STRONG&gt;, there were multiple lines of actions performed in the Active Directory. I want to take the value in a Target column and do a wild card search on the Notes column in &lt;STRONG&gt;Ticket Table&lt;/STRONG&gt; for any records that match and return the Ticket Number.&lt;/P&gt;

&lt;P&gt;For example, I want to return the Ticket Number for the Password Reset activity done on Bobby. In this particular case, I need to do a wildcard search on Ticket Table in the Notes column for any words that has "Bobby" in it.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6016iDBF0DDF1794DDD3D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The expected end result should be:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6017iC062D3C1E21DB6EC/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I am able to return the results if both the columns (Target) in Report Table and (Notes) in Ticket Table are an exact match using the syntax below. But how can I achieve the results if I want to match the columns based on wildcards? Thank you.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Report_Table.csv 
| lookup local=1 Ticket_Table.csv Notes AS Target OUTPUT Ticket_Number
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Oct 2018 07:20:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454264#M128529</guid>
      <dc:creator>timyong80</dc:creator>
      <dc:date>2018-10-29T07:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my wildcard search involving two columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454265#M128530</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Please look at answer provided by me on this question &lt;A href="https://answers.splunk.com/answers/596835/how-to-search-for-values-in-a-lookup-table-with-wi.html"&gt;https://answers.splunk.com/answers/596835/how-to-search-for-values-in-a-lookup-table-with-wi.html&lt;/A&gt;, it might help you.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 11:13:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454265#M128530</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-10-29T11:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my wildcard search involving two columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454266#M128531</link>
      <description>&lt;P&gt;That answer is for the other way around: event field contains a long string and the lookup table contains a substring with wildcards. @timyong80 wants to match usernames from an event field, to usernames embedded in note strings in a lookup field.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 11:56:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454266#M128531</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-10-29T11:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my wildcard search involving two columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454267#M128532</link>
      <description>&lt;P&gt;How do you plan to deal with situations where user names occur in multiple tickets?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 12:02:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454267#M128532</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-10-29T12:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my wildcard search involving two columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454268#M128533</link>
      <description>&lt;P&gt;You can use the map command for this. Something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Report_Table.csv
| map search="|inputlookup Ticket_Table.csv | search Notes=*$user$* | rex field=Notes "(?&amp;lt;ticketuser&amp;gt;$user$)" | table ticketuser, 'Ticket Number'"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can then join this back to the original lookup to get all the fields together.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 12:25:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454268#M128533</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-10-29T12:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my wildcard search involving two columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454269#M128534</link>
      <description>&lt;P&gt;Good approach but query which you provided didn't work in 7.1.2, however below one is working&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Report_Table.csv
| eval Target="*" + Target + "*"
| map search="|inputlookup Ticket_table.csv | search Notes=$Target$"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Oct 2018 12:36:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454269#M128534</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-10-29T12:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my wildcard search involving two columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454270#M128535</link>
      <description>&lt;P&gt;Ah, thanks. I tested it in 7.2, and also only tested it against indexed data, not against lookup, so it might indeed require a bit of tweaking to get it perfectly working for this particular use case. But I hope the concept at least should work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 15:14:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454270#M128535</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-10-29T15:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my wildcard search involving two columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454271#M128536</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163905"&gt;@harsmarvania57&lt;/a&gt; and &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/87518"&gt;@FrankVl&lt;/a&gt;. By following your advice, I managed to return the entries that matches Target from Report_Table against the Notes field in Ticket_Table. However, the table that it returned contains all the fields from Ticket_Table, just that it now contains two entries  related to NA\dixon and Bobby.&lt;/P&gt;

&lt;P&gt;I tried using | table Report_Table but it didn't work.&lt;/P&gt;

&lt;P&gt;Do you know how can I make the end result that looks like Report_Table with an additional column which is the Ticket Number taken from the Ticket_Table?&lt;/P&gt;

&lt;P&gt;Thanks again and cheers.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:50:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454271#M128536</guid>
      <dc:creator>timyong80</dc:creator>
      <dc:date>2020-09-29T21:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my wildcard search involving two columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454272#M128537</link>
      <description>&lt;P&gt;Yes, start with getting the Report_Table and then use the &lt;CODE&gt;join&lt;/CODE&gt; command, to combine it with what you had.&lt;/P&gt;

&lt;P&gt;So:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Report_Table.csv
| join type=left Target [
| inputlookup Report_Table.csv
| eval Target="*" + Target + "*"
| map search="|inputlookup Ticket_Table.csv | search Notes=$Target$ | rex field=Notes "(?&amp;lt;Target&amp;gt;$Target$)" | table Target, 'Ticket Number'" ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Oct 2018 09:17:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454272#M128537</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-10-30T09:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my wildcard search involving two columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454273#M128538</link>
      <description>&lt;P&gt;@FrankVl Thank you for your efforts. Not sure why didn't worked still. It's returning me all the same contents from Report_Table.csv. I'm using ver 6.6.8 btw, not sure if it matters. Cheers.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 09:20:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454273#M128538</guid>
      <dc:creator>timyong80</dc:creator>
      <dc:date>2018-10-31T09:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my wildcard search involving two columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454274#M128539</link>
      <description>&lt;P&gt;But does the second part of the search (if you run it without the first inputlookup and join) return the list of users and their ticket number?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 11:54:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-wildcard-search-involving-two-columns/m-p/454274#M128539</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-10-31T11:54:03Z</dc:date>
    </item>
  </channel>
</rss>

