Splunk Search

Append results in a single line.

Raging_Rags
Engager

| dbxquery connection="*"  query="select STOREENT_ID,count(*) O_C from table1 "
| appendcols
[| dbxquery connection="*" query="select count(*) P_S_T from table2 "
| join
[| dbxquery connection="*" query="select count(*) P_E_Y from table2"]
|join [dbxquery connection="*" query="select count(*) P_ACTIVE from table2 where status=1"]]

 

This my sample query, I want all the results in a single line. The value before append prints in a line and after append the values are printed in a new line.

Labels (5)
0 Karma

to4kawa
Ultra Champion

| stats values(*) as *

 

try this.

Raging_Rags
Engager

Actually its working but 2 rows get mixed up.

 

0 Karma

to4kawa
Ultra Champion

for mixed up field

| eval fieldname=mvjoin(mixed_up_field,",")

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...