All Apps and Add-ons

How do you select values on two tables?

wallyd241
New Member

Hi !
I want to select values ​​in two different tables to join via table values ​​but I have a compilation error.
Can you help me please ? (See picture):
I want to select idenvoi, idflux, and statut from "PAS_RAU"."T_ENVOI" and idenvoi from "PAS_RAU"."T_DECLARATION"

alt text

alt text

0 Karma
1 Solution

vishaltaneja070
Motivator

Hello @wallyd241 ,

There are two ways to do it:
1. Change the Column name directly like :
select e.IDFLUX, e.IDENVOI as IDENVOI1, d.IDENVOI as IDENVOI2, e.STATUT from PAS_RAU.T_ENVOI e, PAS_RAU.T_DECLARATION d
2. Use shortnames attribute: set shortnames=false
Syntax: shortnames=
Description: By default, the returned fields will be in the form ... Set the shortnames argument to true to
return fields called .

like | dbxquery query="your_query" connection="connection_name" shortnames=false
http://docs.splunk.com/Documentation/DBX/3.1.3/DeployDBX/Commands

View solution in original post

0 Karma

wallyd241
New Member

Thank you for this help:
In the Db connect hi no accepte this syntax, i add the "shortnames=false" on the search.

Thanks.

0 Karma

mstjohn_splunk
Splunk Employee
Splunk Employee

hi @wallyd241 ,

Did you get a chance to check out @vishaltaneja07011993 's answer? Did it work for you? If so, would you approve his answer so that the rest of the community knows it's correct? If it's not correct, would you update us as to the status of your problem?

Thanks!

0 Karma

vishaltaneja070
Motivator

Hello @wallyd241 ,

There are two ways to do it:
1. Change the Column name directly like :
select e.IDFLUX, e.IDENVOI as IDENVOI1, d.IDENVOI as IDENVOI2, e.STATUT from PAS_RAU.T_ENVOI e, PAS_RAU.T_DECLARATION d
2. Use shortnames attribute: set shortnames=false
Syntax: shortnames=
Description: By default, the returned fields will be in the form ... Set the shortnames argument to true to
return fields called .

like | dbxquery query="your_query" connection="connection_name" shortnames=false
http://docs.splunk.com/Documentation/DBX/3.1.3/DeployDBX/Commands

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!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...