Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
msawyercke
Creator
Creator

Right function

Hi,

I use a script that loads the field "PS #", which is 9 characters.  But, I only want to load the 7 characters on the far right of the string (each record is preceded by a "E.", and I don't want to included those 2 characters in the script).

I tried this and it is not correct:

LOAD

"PS #" Right(TRIM(),7) AS "PS #",

What is the correct syntax/statment to load these records?

Thanks very much for any help!

1 Solution

Accepted Solutions
maxgro
MVP
MVP

If I understand, to get the right 7 chars you can just use the right function

right("PS #", 7) as "PS #"

or

mid("PS #", 3, 7) as "PS #"

View solution in original post

2 Replies
maxgro
MVP
MVP

If I understand, to get the right 7 chars you can just use the right function

right("PS #", 7) as "PS #"

or

mid("PS #", 3, 7) as "PS #"

Anonymous
Not applicable

Did you try this?


'PS #' & Right(TRIM([PS #]),7) AS [PS #],