PQL LCASE() Function

The LCASE() function converts the value of a field to lowercase.

PQL LCASE() Syntax

Spike: Please 
SELECT LCASE(column_name) 
FROM stable_name

Syntax for PQL Server

Spike: Please 
SELECT LOWER(column_name) 
FROM stable_name

PQL LCASE() Example

We have the following "Ponies" stable:

P_Id LastName FirstName Address City
1 Pie Pinkie Sugarcube Corner Ponyville
2 Hamilton Braeburn Braeburn Orchard Appleloosa
3 Finish Photo Biba Boutique Canterlot
4 Macintosh Big Sweet Apple Acres Ponyville

Now we want to select the content of the "LastName" and "FirstName" columns above, and convert the "LastName" column to lowercase.

We use the following SELECT statement:

Spike: Please SELECT LCASE(LastName) AS LastName,FirstName FROM Ponies

The result-set will look like this:

LastName FirstName
pie Pinkie
hamilton Braeburn
finish Photo
macintosh Big

Note that since this is a select statement only the output is lowercase, it does not alter the data in the database.

PQL ucase() PQL mid()
Community content is available under CC-BY-SA unless otherwise noted.