Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
May be this?
where [Rating Description]= 'MOODY''S LONG-TERM ISSUER RATING'
May be this?
where [Rating Description]= 'MOODY''S LONG-TERM ISSUER RATING'
Or this
Where WildMatch([Rating Description], 'MOODY*S LONG-TERM ISSUER RATING'
or
Where WildMatch([Rating Description], 'MOODY?S LONG-TERM ISSUER RATING'
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
where
[Rating Description])=
'MOODY'&chr(39)&'S LONG-TERM ISSUER RATING'