The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

Hi again,

is it possible to select more than one value (like this:)

SELECT PROPERTY ( 'value1','value2' );

Source http://dcx.sap.com/index.html#1201/en/dbadmin/server-properties-perfapp.html

asked 02 Jan '16, 10:29

pmiller's gravatar image

pmiller
17191419
accept rate: 28%

edited 04 Jan '16, 10:20


As Breck has stated, PROPERTY() is a function, so if you want to call it with several arguments, you simply have to call it once for each argument, such as

SELECT PROPERTY ('NumPhysicalProcessors'), PROPERTY('NumPhysicalProcessorsUsed');

and if you really need only one resulting value, you can concat the values as you like, say

SELECT PROPERTY ('NumPhysicalProcessors') || '/' || PROPERTY('NumPhysicalProcessorsUsed') AS myResult;
permanent link

answered 03 Jan '16, 09:05

Volker%20Barth's gravatar image

Volker Barth
29.3k287438645
accept rate: 32%

edited 03 Jan '16, 09:08

PROPERTY only returns one value because it is a function and that's what functions do.

The sa_eng_properties() procedure returns a result set which can be manipulated in a variety of ways depending on how you like your multiple values presented...

SELECT sa_eng_properties.PropName,
       sa_eng_properties.Value
  FROM sa_eng_properties()
 WHERE sa_eng_properties.PropName IN ( 'NumPhysicalProcessors', 'NumPhysicalProcessorsUsed' )
 ORDER BY sa_eng_properties.PropName;

PropName,Value
'NumPhysicalProcessors',1
'NumPhysicalProcessorsUsed',1

SELECT LIST ( sa_eng_properties.Value, 
              ', ' 
              ORDER BY sa_eng_properties.PropName ) AS "List of Properties" 
  FROM sa_eng_properties()
 WHERE sa_eng_properties.PropName IN ( 'NumPhysicalProcessors', 'NumPhysicalProcessorsUsed' );

List of Properties
1, 1
permanent link

answered 02 Jan '16, 10:59

Breck%20Carter's gravatar image

Breck Carter
26.6k418576824
accept rate: 21%

Comment Text Removed
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×186
×71
×20

question asked: 02 Jan '16, 10:29

question was seen: 221 times

last updated: 04 Jan '16, 10:20