Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
arsenal1983
Creator
Creator

quotation in conditional name - script

Hi,

I need to import the data set with condition:

where

[Rating Description])= 'MOODY'S LONG-TERM ISSUER RATING'

I get an error because of the quotation mark in MOODY'S

How I can handle with this?

Luke

1 Solution

Accepted Solutions
Anil_Babu_Samineni

May be this?

where [Rating Description]= 'MOODY''S LONG-TERM ISSUER RATING'

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

4 Replies
Anil_Babu_Samineni

May be this?

where [Rating Description]= 'MOODY''S LONG-TERM ISSUER RATING'

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Or this

Where WildMatch([Rating Description], 'MOODY*S LONG-TERM ISSUER RATING'

or

Where WildMatch([Rating Description], 'MOODY?S LONG-TERM ISSUER RATING'

Miguel_Angel_Baeyens

I usually replace these values during the load for a character or string I know for sure this field, say

...

Replace([Rating Description], Chr(39), '$$$') AS [Rating Description],

...

So now instead of ' you will have $$$, which is easier to find, replace, and even remove in a later step in the script prior to displaying data.

Other options:

'MOODY''S LONG-TERM ISSUER RATING' // see the double single quote to "escape" the ' character

'MOODY' & Chr(39) & 'S LONG-TERM ISSUER RATING' // use the ASCII Chr() function

sasiparupudi1
Master III
Master III

where

[Rating Description])=

'MOODY'&chr(39)&'S LONG-TERM ISSUER RATING'