Separate multiple search values with an OR clause with Splunk? - splunk

I have a text box in a Splunk dashboard, and I'm trying to find out how I can separate values entered into the text box that are separated by commas with an OR clause.
For example:
values entered into text box: 102.99.99, 103.99.93, 203.23.21
index=abc sourcetype=abc src_ip="$ip$"
Any suggestions?

What about using the IN operator?
index=abc sourcetype=abc src_ip IN ($ip$)

Related

Formula to separate text between delimiters in string field in BigQuery

I have the following field:
XYZASDF543::DFKEINFBJI65::ORFN6849
I need an SQL formula in BigQuery that can give me text between delimiters:
DFKEINFBJI65
Any ideas? Thanks!
There are lots of fields like this in my dataset, and numbers of symbols are not the same in each field, so I can't use left or right function.

Using Splunk Dashboard how to create a filter for each column of a table

I have a table that I saved as a report and created a dashboard that displays the table.
I want to add inputs for each field on the table to be able to filter the table data.
This is the table
I added a text box as the first input
How do I link the text box that has a token called purchCostReferenceToken to the purchCostReference column on the table?
Strictly speaking, the input and the table are not related. The input controls the search and the table is one way to represent the results of the search.
To control the search, use the input token in it. Use dollar signs to denote the token. For example,
index=foo purchCostReference=$purchCostReferenceToken$ | ...
You will need a default value for the token to make this work when no input is provided. Usually, that value is *.

Suggestion about dealing with subqueries that need string analysis

I need to create a query on the fly through VBA that get some strings from a table based on a set of criteria selected by the user . From the results of that first query I need to find the position of certain characters in the strings and only select the one that have the characters at a given position. This need to be done quickly as it then needs to be displayed in a combo box for the user to select before he runs a full other query.
So my question is what is the fastest/best way to do this ?
Should I put the result of the first query in a temporary table , analyze the strings from that table, delete the records that don't meet the selection and then run a query to display in the combo box from that table ?
Thank you

How to program a textbox so that multiple values are separated by quotes?

Good morning everyone!
I am experimenting with an Access 2007 form which contains a textbox that inserts values into a query. I want to be able to enter multiple values into the textbox. The values are separated by a comma but are also wrapped in quotes. The values in the textbox are inserted in a HAVING Clause.
Here is what the code looks like:
Example:
HAVING Max([COLOR].[COLOR_CODE] In ("11111","22222"))
Now I want to use a textbox on a form to insert the value but I need to handle the quotes. So I converted the values to Numbers both at the SELECT Statement and at the HAVING Clause.
Example:
HAVING Max(CLng([COLOR].[COLOR_CODE] In ([Forms].[MyForm]![txtColorCode])))
The problem is when I enter 11111 into the textbox on the form the query works but when I enter 11111,22222 the query does not work.
So I have this idea; what if I could enter, e.g: 11111,22222,33333,44444 and use code to format the values to "11111","22222","33333","44444"
This way I can abandon the Conversion/CLng and just use the IN Operator with the string.
How can I formatting or transformation so that it is inserted into the query. Maybe on Submit?
I would really appreciate and input or ideas.
Thanks everyone.
Guy
Where are these values coming from? Is a listbox out of the question? Do not forget that you can add and delete values from a list box easily enough and even more easily if you can reference a table. Once you have the values selected, you can iterate over them to create the clause you need.
You will always have to build the query in VBA, you will not be able to refer to a textbox like this in the query design window.

VBscript to display all values in a column separated by a comma?

I want to display all email addresses from a column (named email) separated by a comma in html. How would I write a sql query in an html page?
Here is a writeup on it with good notes:
http://wiki.lessthandot.com/index.php/Concatenate_Values_From_Multiple_Rows_Into_One_Column