use mutiple select in single SQL

use mutiple select in single SQL

  

I want to assign data from 2 different select to 2 different structure to avoid multiple DB call. Can I do that?.

I want to assign FirstName to Name structure and LastName to Name2 structure.

IN .net we can write multiple select in single procedure and can store complete data in dataset and can refer to different table based on need. How to achieve same functionality in OutSystem so that we can avoid multipe DB opetation

Hello Jayesh, 

You mat try this :

SyntaxEditor Code Snippet

SELECT 'Jayesh' , '' 
Union 
Select '' , 'Prajapt' 

with the result 

Hope to have helped

Graça

Hello jayesh,

If you are concerned with db connection degrading performance, you should read this about connection pooling.

While Graça's solution is a valid option, I don't think the add complexity of having to maintain 2 or more queries inside a single sql, with the extra logic behind it, is desirable.

Probably connection pooling is enough to your use case.

Cheers

Eduardo Jauch