PQL downcase, lower, upcase and upper functions - GoToAssist Monitoring

GoToAssist Monitoring Service Status

Service Fully Operational

***Our GoToAssist maintenance window is Wednesday or Friday 6:00am-10:00am GMT. A maintenance generally results in 5-10 minutes of downtime during the beginning of the maintenance window.***

Updated: Wed, Oct 17 2012 2:27 PM RSS Feed

Find an Answer

Search GoToAssist Monitoring articles, videos and user guides   Your search term must have 2 or more characters.

Browse Articles

PQL downcase(), lower(), upcase(), and upper() functions

PQL includes 4 functions that determine case:

downcase() and lower()

downcase(), lower() — Convert all characters in a string to lower case.

Syntax

Both downcase() and lower() functions return a string or a tree, and take one parameter which is a string or a tree:

downcase():

string downcase(string input)
    OR
tree downcase(tree input)
lower():

string lower(string input)
    OR
tree lower(tree input)

Return value

Both downcase() and lower() functions return an output that is the same type as the input.

Description

Both downcase() and lower() convert all characters in a string to lower case. Both functions take one parameter, and return the same type.

Example 1: Results in lower case

Query: Which devices have free disk space that is less than 1 GB?

SELECT downcase(systemname) 
FROM %free disk space% 
WHERE freespace < 1000000000
AND description = 'Local Fixed Disk'

Since the downcase() and lower() functions are interchangeable, they work in the same query:

SELECT lower(systemname) 
FROM %free disk space% 
WHERE freespace < 1000000000
AND description = 'Local Fixed Disk'

Both queries list all machines on the network that meet the criteria. The downcase() or lower() function is used to list the results in lower case.

Results: Depending on the database, this query returns results similar to this:

row
   upper(systemname)
     systemname laser
row
  upper(systemname)
     systemname sodium
row
  upper(systemname)
     systemname josh-vm-xp  
   . . .


upcase() and upper()

upcase(), upper() — Convert all characters in a string to upper case.

Syntax

The syntax for both upcase() and upper() functions is identical.

upcase():

string upcase(string input)
    OR
tree upcase(tree input)
upper():

string upper(string input)
    OR
tree upper(tree input)

Return value

Both upcase() and upper() functions return an output that is the same type as the input.

Description

Both upcase() and upper() convertall characters in a string to upper case. Both functions take one parameter, and return the same type.

 

Example: Results in upper case

Query: Which devices have free disk space that is less than 1 GB?

SELECT upcase(systemname) 
FROM %free disk space% 
WHERE freespace < 1000000000
AND description = 'Local Fixed Disk'

Since the upcase() and upper() functions are interchangeable, they work in the same query:

SELECT upper(systemname) 
FROM %free disk space% 
WHERE freespace < 1000000000
AND description = 'Local Fixed Disk'

Both queries list all machines on the network that meet the criteria. The upcase() or upper() function is used to list the results in upper case.

Results: Depending on the database, this query returns results similar to this:


row
   upper(systemname)
     systemname LASER
row
  upper(systemname)
     systemname SODIUM
row
  upper(systemname)
     systemname JOSH-VM-XP  
   . . .

To see other PQL functions, see Functions.

Related topics

| Views: 1603 | Last Updated: Thu, May 09 2013 2:28 PM

Is this article helpful?