Logo
2022.1.6

Contents:

  • Getting Started
    • Preparing Your Machine to Install SQream
    • Installing SQream
    • Executing Statements in SQream
    • Performing Basic SQream Operations
      • Running the SQream SQL Client
      • Creating Your First Table
      • Listing Tables
      • Inserting Rows
      • Running Queries
      • Deleting Rows
      • Saving Query Results to a CSV or PSV File
    • Hardware Guide
  • Installation Guides
    • Installing and Launching SQream
      • Recommended Pre-Installation Configuration
      • Installing SQream Using Binary Packages
      • Installing and Running SQream in a Docker Container
      • Installing SQream with Kubernetes
      • Installing Monit
      • Launching SQream with Monit
    • Installing SQream Studio
      • Installing Prometheus Exporter
      • Installing Prometheus Using Binary Packages
      • Installing the Dashboard Data Collector
      • Installing Studio on a Stand-Alone Server
      • Installing an NGINX Proxy Over a Secure Connection
  • Data Ingestion Sources
    • Inserting Data Overview
    • Inserting Data from Avro
    • Inserting Data from a CSV File
    • Inserting Data from a Parquet File
    • Inserting Data from an ORC File
  • Connecting to SQream
    • Client Platforms
      • Connect to SQream Using Informatica Cloud Services
      • MicroStrategy
      • Connecting to SQream Using Pentaho Data Integration
      • Connect to SQream Using PHP
      • Connect to SQream Using Power BI Desktop
      • Connect to SQream Using R
      • Connecting to SQream Using SAP BusinessObjects
      • SAS Viya
      • Connect to SQream Using SQL Workbench
      • Connecting to SQream Using Tableau
      • Connecting to SQream Using Talend
      • Connecting to SQream Using TIBCO Spotfire
    • Client Drivers
      • JDBC
      • Connecting to SQream Using Python (pysqream)
      • Node.JS
      • ODBC
        • Install and Configure ODBC on Windows
        • Install and configure ODBC on Linux
      • .NET
  • External Storage Platforms
    • Inserting Data Using Amazon S3
    • Using SQream in an HDFS Environment
  • Loading and Unloading Data
  • Feature Guides
    • Automatic Foreign Table DDL Resolution
    • Query Healer
    • Data Encryption
      • Overview
      • Encryption Methods
      • Data Types
      • Syntax
      • Permissions
    • Compression
    • Python UDF (User-Defined Functions)
    • Workload Manager
    • Concurrency and Locks
    • Concurrency and Scaling in SQream DB
  • Operational Guides
    • Access Control
      • Password Policy
      • Overview
      • Managing Roles
      • Permissions
      • Departmental Example
    • Creating or Cloning Storage Clusters
    • Working with External Data
      • Inserting Data Using Amazon S3
      • Using SQream in an HDFS Environment
    • Foreign Tables
    • Deleting Data
    • Exporting Data
    • Logging
    • Monitoring Query Performance
    • Security
    • Saved Queries
    • Seeing System Objects as DDL
    • Optimization and Best Practices
  • SQream Acceleration Studio 5.4.7
    • Getting Started with SQream Acceleration Studio 5.4.7
    • Monitoring Workers and Services from the Dashboard
    • Executing Statements and Running Queries from the Editor
    • Viewing Logs
    • Creating, Assigning, and Managing Roles and Permissions
    • Configuring Your Instance of SQreams
  • System Architecture
    • Internals and architecture
    • Filesystem and usage
  • Configuration Guides
    • Configuring the Spooling Feature
    • Configuring SQream
      • Configuration Levels
      • Flag Types
      • Configuration Roles
      • Modification Methods
      • Configuring Your Parameter Values
      • Command Examples
      • Showing All Flags in the Catalog Table
      • All Configurations
    • Configuration Flags
      • Administration Flags
        • Regular Administration Flags
        • Cluster Administration Flags
        • Worker Administration Flags
      • Generic Flags
        • Regular Generic Flags
        • Worker Generic Flags
    • Configuring SQream Using the Previous Configuration Method
  • Reference Guides
    • SQL Statements and Syntax
      • SQL Syntax Features
      • SQL Statements
      • SQL Functions
        • Built-In Scalar Functions
        • User-Defined Functions
        • Aggregate Functions
        • Window Functions
    • Catalog Reference Guide
      • Overview
      • What Information Does the Schema Contain?
      • Catalog Tables
      • Additional Tables
      • Examples
    • Command line programs
      • metadata_server
      • sqreamd
      • sqream-console
      • sqream-installer
      • server_picker
      • SqreamStorage
      • sqream sql
      • upgrade_storage
    • SQL Feature Checklist
  • Data Type Guides
    • Converting and Casting Types
    • Supported Data Types
    • Supported Casts
      • Numeric
      • Boolean
      • Integer
      • Floating Point
      • String
      • Date
  • Release Notes
    • Release Notes 2022.1
      • Release Notes 2022.1.6
      • Release Notes 2022.1.5
      • Release Notes 2022.1.4
      • Release Notes 2022.1.3
      • Release Notes 2022.1.2
      • Release Notes 2022.1.1
      • Release Notes 2022.1
    • Release Notes 2021.2
      • Release Notes 2021.2.1.24
      • Release Notes 2021.2.1
      • Release Notes 2021.2
    • Release Notes 2021.1
      • Release Notes 2021.1.2
      • Release Notes 2021.1
    • Release Notes 2020.3
      • Release Notes 2020.3.2.1
      • What’s new in 2020.3.2
      • Release Notes 2020.3.1
      • Release Notes 2020.3
    • Release Notes 2020.2
    • Release Notes 2020.1
  • Troubleshooting
    • Remedying Slow Queries
    • Resolving Common Issues
    • Examining Logs
    • Identifying Configuration Issues
    • Lock Related Issues
    • Log Related Issues
    • Core Dumping Related Issues
    • Gathering Information for SQream Support
  • Glossary
SQream DB
  • RIGHT

RIGHT

Returns the right part of a character string with the specified number of characters.

See also LEFT.

Syntax

RIGHT( expr , character_count )

Arguments

Parameter

Description

expr

String expression

character_count

A positive integer that specifies how many characters to return.

Returns

Returns the same type as the argument supplied.

Notes

  • This function works on TEXT strings only.

  • If the value is NULL, the result is NULL.

Examples

For these examples, consider the following table and contents:

CREATE TABLE jabberwocky(line TEXT(50));

INSERT INTO jabberwocky VALUES
   ('''Twas brillig, and the slithy toves '), ('      Did gyre and gimble in the wabe: ')
   ,('All mimsy were the borogoves, '), ('      And the mome raths outgrabe. ')
   ,('"Beware the Jabberwock, my son! '), ('      The jaws that bite, the claws that catch! ')
   ,('Beware the Jubjub bird, and shun '), ('      The frumious Bandersnatch!" ');

Using RIGHT

t=> SELECT LEFT(line, 10), RIGHT(line, 10) FROM jabberwocky;
left       | right
-----------+-----------
'Twas bril | thy toves
      Did  | the wabe:
All mimsy  | orogoves,
      And  | outgrabe.
"Beware th | , my son!
      The  | at catch!
Beware the |  and shun
      The  | rsnatch!"

© Copyright 2022 SQream. Revision a91fce75.