The question was originally tagged Postgres only. This answers the original question.
You can use regexp_matches():
select (regexp_matches(str, 'submissionGuid=(.{32})'))[1]
You can be more specific about the format of the GUID, but 32 characters is a good place to start.
Answer from Gordon Linoff on Stack OverflowAWS
docs.aws.amazon.com › amazon redshift › database developer guide › sql reference › sql functions reference › string functions
String functions - Amazon Redshift
Amazon Redshift will no longer ... 30, 2026. For more information, see the blog post ... String functions process and manipulate character strings or expressions that evaluate to character strings....
AWS
docs.aws.amazon.com › amazon redshift › database developer guide › sql reference › sql functions reference › string functions › substring function
SUBSTRING function - Amazon Redshift
If the start_position + number_characters exceeds the length of the string, SUBSTRING returns a substring starting from the start_position until the end of the string. For example: select substring('caterpillar',6,8); substring ----------- pillar (1 row) If the start_position is negative or 0, the SUBSTRING function returns a substring beginning at the first character of string with a length of start_position + number_characters -1.
amazon web services - Redshift SQL - select part of a string - Stack Overflow
I'm not sure about the sample code ... Amazon Redshift documentation both the SubString and CharIndex functions used in my solution are supported as shown. 2020-05-06T18:40:20.51Z+00:00 ... The expression you should use is submissionGuid=([^&]*). () is the capture group that captures the string you wish to ... More on stackoverflow.com
Which Redshift SQL version / functions are supported?
Hey ya'll, I'm trying to write query to do a Regex sub string on some text. Beast Mode and Magic ETL have Regex but not Regex sub string. MySQL has the capability but Domo is on version 5.x~. My last option was Redshift SQL. My query: SELECT SUBSTRING_REGEX("Description", '.*(Red).*') as color ... More on community-forums.domo.com
sql - Function for string column values comparison in RedShift - Stack Overflow
I'm using ilike for column string case insensitive comparison in Redshift. To better handle the string size I do select * from testset t join predictions p on p.id = c.id and c.text... More on stackoverflow.com
Process a string and insert into Redshift
I am trying to process a string ... Guide”}' and insert it into a table in Redshift I know this can be done using a programming language but I am trying to do it using just SQL inside a stored procedure. Is there any SQL function/code that could help with this?... More on repost.aws
Videos
03:19
Troubleshooting UNION and String Literal Filtering Issues in Amazon ...
01:30
Extracting Values from Strings in Redshift: A Guide to Regex in ...
01:29
Counting the Appearance of || in a String in Amazon Redshift - YouTube
Query Redshift Table with SQL in Python | AWS SDK for Pandas - YouTube
Dwgeek
dwgeek.com › home › what are instr alternative functions in redshift?
What are INSTR Alternative Functions in Redshift? - DWgeek.com
March 13, 2023 - What are INSTR Alternative Functions in Redshift?, Redshift STRPOS, POSITION, CHARINDEX, REGEXP_INSTR functions to search string
EDUCBA
educba.com › home › data science › data science tutorials › aws tutorial › redshift substring
Redshift Substring | How does Redshift Substring () Works | Examples
March 4, 2023 - To extract required string from existing string then we use the Redshift Substring () function. The extraction of the sub string will be done based on the position mentioned in the syntax.
Call +917738666252
Address Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
Top answer 1 of 3
2
The question was originally tagged Postgres only. This answers the original question.
You can use regexp_matches():
select (regexp_matches(str, 'submissionGuid=(.{32})'))[1]
You can be more specific about the format of the GUID, but 32 characters is a good place to start.
2 of 3
0
Use Substring and charindex functions;
Declare @txt varchar(100)
Set @TXT = 'kjaskjdhfaskjhfkjhfaksjdhf&GUID=thisisa36charstring*****************&andcarryingon'
select substring(@TXT,charindex('Guid=',@TXT)+5,36)
AWS
docs.aws.amazon.com › amazon redshift › database developer guide › semi-structured data in amazon redshift › operators and functions
Operators and functions - Amazon Redshift
The most common example is the JSON_TYPEOF scalar function that returns a VARCHAR with values boolean, number, string, object, array, or null, depending on the dynamic type of the SUPER value. Amazon Redshift supports the following boolean functions for SUPER data columns:
Sdf
docs.sdf.com › reference › redshift › string_functions
String Functions - SDF
function substr(varchar, bigint) returns varchar function substr(varchar, bigint, bigint) returns varchar 🔗 Official Documentation
AWS
docs.aws.amazon.com › amazon redshift › database developer guide › sql reference › sql functions reference › string functions › left and right functions
LEFT and RIGHT functions - Amazon Redshift
Amazon Redshift will no longer ... June 30, 2026. For more information, see the blog post ... These functions return the specified number of leftmost or rightmost characters from a character string......
Domo
community-forums.domo.com › home › community forums › connectors
Which Redshift SQL version / functions are supported? - Domo Community Forum
April 6, 2021 - Hey ya'll, I'm trying to write query to do a Regex sub string on some text. Beast Mode and Magic ETL have Regex but not Regex sub string. MySQL has the capability but Domo is on version 5.x~. My last option was Redshift SQL. My query: SELECT SUBSTRING_REGEX("Description", '.*(Red).*') as color ...
AWS
docs.aws.amazon.com › amazon redshift › database developer guide › sql reference › sql functions reference › string functions › position function
POSITION function - Amazon Redshift
The string or column to be searched. The POSITION function returns an INTEGER corresponding to the position of the substring (one-based, not zero-based). The position is based on the number of characters, not bytes, so that multi-byte characters are counted as single characters.
Snowflake
docs.snowflake.com › en › migrations › snowconvert-docs › translation-references › redshift › redshift-functions
SnowConvert AI - Redshift - Built-in functions | Snowflake Documentation
A hash function is a mathematical ... ... Redshift and Snowflake results may differ in scale. String functions process and manipulate character strings or expressions that evaluate to character strings....
Hevo
hevodata.com › home › learn › data warehousing
Understanding Amazon Redshift Regex: Simplified 101 | Hevo
January 9, 2026 - The following example replaces all occurrences of the string “FOX” with the value “quick brown fox“, using case-insensitive matching. SELECT regexp_replace('the fox', 'FOX', 'quick brown fox', 1, 'i'); regexp_replace --------------------- the quick brown fox ... Regexp_substr is another Amazon Redshift Regex function that searches for the regex pattern in the provided string/column and extracts the matched characters.
AWS re:Post
repost.aws › questions › QU1BKlET_0SxiFFUegZArp8A › process-a-string-and-insert-into-redshift
Process a string and insert into Redshift | AWS re:Post
April 28, 2022 - Stored Procedure documentation: https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_PROCEDURE.html ... create or replace procedure pr_example2() as $$ BEGIN insert into mytable (column1, column2, column3) values ('value1', 'value2', 'value3'), ('value3', 'value4', 'value5'); END; $$ LANGUAGE plpgsql; ... Why does my Athena query fail with the error "HIVE_BAD_DATA: Error parsing field value for field X: For input string: "12312845691""?
Hevo
hevodata.com › home › learn › data warehousing
Redshift Cast Functions 101: Syntax and Queries Simplified
January 9, 2026 - Below is the list of formats supported by Redshift: Multibyte Character: is a product of a number of characters and the number of bytes per character. For instance, if a string has four Chinese characters, each character is three bytes and would require VARCHAR(12) to store them in a string.